From: Jonathan B. <jbr...@ea...> - 2004-08-10 15:30:59
|
On Tue, 2004-08-10 at 10:41, Awa...@ao... wrote: > included in this email is a modifed routine to plot thick curves > without twisting ... > > (This code can replace the same routine in curve.cpp) > > The only modification is to the code which calculates the orthogonal > vectors which span the plane at the intersection of line segments. > The modification constructs orthogonal vectors which span the first > plane (perpendicular to the first line segment) and then parallel > transports these vectors along the curve. > > regards > > Andrew Wadsley Well, I see that it fixes the twist, but it introduces another problem. If you run the drape demo in slow motion (change line 39 to rate(10), or so), you will see that in some places the line becomes flat as it falls on the spheres. tictac.py also shows this behavior: The flat faces are parallel to +y. You may have to rotate the scene such that the camera is under the grid to see it clearly. FYI, the next major revision to VPython will probably use GLE (http://linas.org/gle/) for much higher-quality thick line rendering code. I can't say when that release will be available. I have some concerns about its speed, although the results look great. If you manage to fix the current thickline rendering code, that would give me something suitable to compare against. Thanks, -Jonathan P.S. Please send the update as either a unified diff (created with diff -u), or as an attachment. When sent inline, the formatting was totally butchered. Also, please use tabs rather than spaces. |