Text archives Help
- From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
- To: seg3d@sci.utah.edu
- Subject: [Seg3D] Re: Re: Re: New Spline Tool
- Date: Fri, 16 Oct 2009 18:00:03 +0100
Michael Callahan wrote:
Eventually, I would like to replace the polygon lines by a spline curve.
Does anybody have any suggestions on how to do this? I know almost
nothing about OpenGL.
You divide the spline up into line segments and draw those.
Hi Michael,
Thanks for the advice.
I have seen that it's possible to draw a spline as such in OpenGL using
glMap1f() and glEvalCoord1f() [1], but in any case I would need to
compute the spline explicitly also if I want to do the "contour"
segmentation.
I suppose that computing the spline first (typically as a periodic cubic
spline), and then converting the seeds to control points of Bézier basis
functions for OpenGL is too much hassle, and probably prone to error.
So I'll follow your advice, compute the spline coefficients, then sample
it to get small line segments, and plot those.
[1]
http://glprogramming.com/red/chapter12.html
Best regards,
Ramon.
--
Ramón Casero Cañas, DPhil
Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD
tlf +44 (0) 1865 610807
web
http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos
http://www.flickr.com/photos/rcasero/
Archive powered by MHonArc 2.6.16.