Re: [gtk-list] drawing interesting curves




> figured out most of the rest of it, but the cables, I have no idea how
> to even begin. First, they are rather interesting curves whose shape
> has to be computed at run-time. Second, they have a builtin "lighting
> model" that helps them look pretty realistic. I have no idea how to
> map the X drawing primitives, or the gdk equivalents or anything else
> onto the challenge of drawing stuff like this.
> 
> Any ideas would be very helpful.
> 
> --p

OpenGL and equivalents have lighting models built in.  I believe
that I saw someone recently (a couple of days ago) post information
about a GL Drawing area.  The "cables" in the URL you posted looked
like they were three-d models rendered in 2D.  Again, OpenGL is
your tool.  You would simply need to model the way the cables "hang"
in 3D (using gravity, stiffness, etc.).  Once you did that, you could
build a polygonal cable and have the OpenGL commands render it from
the appropriate viewpoint.  You would probably want to use an
orthogonal projection, which is easy to do in OpenGL.

--josh

----------------------------------------------------------------
                       Joshua Richardson
Dept. Cognitive and Neural Systems / Center for Adaptive Systems
                       Boston University
----------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]