简体   繁体   中英

Cut out parts of the cone in java3d

I want to cut out top of the Primitive Cone in java3d and i want to get rid of the bottom part so I can have a lamp cover that looks something like this: http://www.lulusoso.com/upload/20110604/2010_Replacement_Lamp_Cover.jpg

How can I do this?

Thanks, Eugene.

You could try and do some boolen shape operations on the cone but I'm not sure it would be easier than just creating a new shape by defining two rings of vertices and connect them to form triangles. Accessing and modifying the default cone shape might be harder than it seems, but I'm not sure about this. I never tried because creating my own shapes directly was easier :)

There's some math involved to calculate the positions of the vertices but I guess that's what your homework is really about. It's actually not that hard with a bit of sine/cosine usage and you'd most probably get some easier to read and understand code as well as potentially better visual results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM