3D object from 2D drawing

Started by dimvolk, October 28, 2017, 12:44:07 AM

Previous topic - Next topic

dimvolk

Hi
How create 3D object/model from 2D drawing on button click (or vice versa)?
For example: in app i draw 2D cube (round or other) and on click it should be converted/transformed to 3D model.
Any help or link, example?
Thanks

EgonOlsen

No idea. jPCT-AE doesn't prevent you from doing this, but it doesn't offer support for it either. You somehow have to triangulate the 2d drawing and then create an Object3D from it.

dimvolk

Thanks for answer.
What i need is to create scene/model based on points from 2D touch points.
For example is in 2D , and in 3D get this


dimvolk

Thanks for answer.
But i'm not understand how get a distance between points. And what if is needed to create object based on curve line (bezier, round etc). it is possible?

MichaelJPCT

these all can be done. but much maths calculation is involved, if you don't know how to calculate distance between points, you should find someone who is good in maths, geometry, computer graphics, java programming to do this. it takes a lot to do the work, you can't learn all these in a few weeks.

EgonOlsen

If you have the shape in 2d defined by the end points, you need some sort for triangulation algorithm to convert it into 2d triangles (i.e. in a plane). Once you have that, you can extend it in 3d pretty easily. There are several triangulation algos out there, just google for it. It also depends on your objects. It's getting more complex, if your objects can be convex as well (your example is concav).

dimvolk

in 2D its all i did. Now in app i can draw any figures i need, change distance between  this points, restart app and again change this drawn figures. Now i need visualize this in 3D.
What if create scene in 3D in new activity from intented points (coordinates)?
in 2D i save this points in constant class. is it possible create scene from them?
Thanks

EgonOlsen

Yes, as mentioned above, it's certainly possible. But you have triangulate your mesh somehow.

dimvolk


dimvolk

Hi
Now i can create any objects from 2D drawing but only with straight line (polygone, line, rectangle). And my problem is curve lines.
How create ring, oval, curve lines, etc...?
Thanks