comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: a polygon version of polyline..
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: a polygon version of polyline.. [message #41131 is a reply to message #41126] Wed, 29 September 2004 17:21 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
George Millward wrote:

> I have a 3D object program which plots magnetic field lines (in 3D
> space) as polylines. This is fine - but I would like to change it so
> that they are coloured 'tubes' - polylines with a certain circular
> cross section and a 'shiny' finish. The look I am after is the one
> you often see with magnetic field topologies (Solar magnetic fields
> models etc.)
>
>
> Simple question is: does anyone know how to do this - or could they
> point me to a ready-made procedure.

I don't know of a ready made procedure, but I did work up something
similar for someone a while back. I googled the group for "tube" and
found the post. That approach won't quite satisfy since the OPer simply
wanted to connect two points with a tube. You would have discontinuity
at the joints if you took this approach.

This would actually be pretty simple. I started playing around with
this but it isn't to a point where it is worth sharing and I would need
some encouragement to get it there. (I am pretty busy right now)

For each vertex v[n] of your polyline you'll need to calculate r
vertices which make up a circle about v[n] that lie on a plane oriented
orthogonal to v[n+1]-v[n-1]. The ends present special cases where your
plane will be orthogonal to v[n+1]-v[n] and v[n-1]-v[n].

Meshing these verts should be straight forward but I haven't thought it
thru. I find that on most PC hardware quad strips render the fastest
(vs tri strips). The IDL docs cover creating quad and tri strip meshes.

Speaking of hardware. Depending on the number of verts in your
polylines and the value you choose for r, you will most likely need some
decent hardware to manipulate this in real time. If you run into
problems render your field as a polyline to orient it as you like then
render it as your tube to create your output.

Hope this gets you started.

-Rick


> http://www.es.ucsc.edu/~glatz/field.html

That is a slick image... Do you know what software package they used?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Disable Virtual Machine
Next Topic: uniform expansion

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:55:55 PDT 2025

Total time taken to generate the page: 2.93075 seconds