Draw Line on Arbitrary Surface

Computer Graphics Asked by Valentin Molina on August 27, 2021

I’m working on a 3D modeling tool and we use data from OpenLayers to construct a 3D mesh of some land. I want this behavior: you click on the mesh and it puts a point where you clicked on the mesh. Then, after the first point has been made, if you hover over the mesh with your mouse, a helper line will appear between the first point you made and where you mouse is currently. This helper line is drawn on the mesh, i.e. conforms to it’s surface. This sounded like simple functionality but is proving quite complex.

I’ve looked into geodesics, and shortest path algorithms but they seem really complex. I’m still fairly new to three.js. I’ve also read about UV mapping, or maybe casting a shadow to create this line.

Does any one have any pointers for this? Or things to look into? Thank you!

Add your own answers!

Related Questions

Why does opengl use 4d matrices for everything?

3  Asked on August 27, 2021 by yoris


Defining “inside” and “outside” of a 3D space

2  Asked on August 27, 2021 by avatrin


Which perspective projection matrix to use

1  Asked on August 27, 2021 by nixcc


How do you apply a normal map to a 3d mesh?

1  Asked on August 27, 2021 by calvin-godfrey


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir