PDA

View Full Version : How to generate a swept surface?



HaVyThoai
12-05-2007, 06:50 AM
Hi everybody,

I got a question that how to creat a swept surface. Would you mind giving me an example code?

For example, from a section like this

http://groups.csail.mit.edu/graphics/classes/6.837/F04/assignments/assignment8/editor8_06.png

a swept surface is generated like this below

http://groups.csail.mit.edu/graphics/classes/6.837/F04/assignments/assignment8/viewer8_06_low.png

k_szczech
12-06-2007, 09:48 AM
Is your data source a bitmap or a 2D geometry?
I guess it's geometry since window is titled "curve editor".
If yes, then what kind of geometry? A line or a strip of polygons?

What you basically need is to replace every point of your curve with set of vertices, placed in 3D space, forming a circle. That should be pretty simple to implement unless you want do have intersections etc.

HaVyThoai
12-06-2007, 08:11 PM
I'm doing the NC Machining Simulator. I want to generate a swept surface that is created by the cutter. it looks like the pictures below.

http://upload.tinhco.net/thoai/swept.JPG

http://upload.tinhco.net/thoai/swept2.JPG

the idea I got is that I will generate a Bezier patch surface which is formed when cutter moving. But I don't know how :( . I need an example similiar to that.