POV-Ray : Newsgroups : povray.newusers : Circular Helix Server Time
1 Nov 2024 23:14:43 EDT (-0400)
  Circular Helix (Message 1 to 10 of 20)  
Goto Latest 10 Messages Next 10 Messages >>>
From: David Robinson
Subject: Circular Helix
Date: 27 Oct 2004 05:28:14
Message: <417f6a2e$1@news.povray.org>
Ok, last question and I'll stop bugging everybody with my n00bness :)

I'm using POV purely because of the ability to script and render a scene;
I'm writing a front end to accomplish the task.

Initially I had expected to export objects to a POV mesh but this particular
scene is particularly complex - hitting over 200MB so far, and I'm not quite
half-way through.

Can POV nativly build a helix that wraps around itself, to form a closed
loop? Imagine a helix following the path of a curve.

All I need to specify is circle diameter, helix thickness and number of
twists (as well as the usual colour/texture etc).

I expect this way to be a lot quicker, if it is supported...

Thanks again for everybody's help so far!

David


Post a reply to this message

From: Renderdog
Subject: Re: Circular Helix
Date: 27 Oct 2004 11:00:00
Message: <web.417fb7a44c4748cbff5df6e40@news.povray.org>
"David Robinson" <tdf### [at] ezrscom> wrote:
> Can POV nativly build a helix that wraps around itself, to form a closed
> loop? Imagine a helix following the path of a curve.
>
> All I need to specify is circle diameter, helix thickness and number of
> twists (as well as the usual colour/texture etc).
>
> I expect this way to be a lot quicker, if it is supported...

There is an isosurface called the Helical Torus that does
what you're looking for. Some info on the parameters
are available at this (very excellent!) resource provided
by Mike Williams:

http://www.econym.demon.co.uk/isotut/nfunc2.htm#ht

Here are a couple of helical tori you can use as starting
points. I used the following parameter values for thin rope
trim around a window:

 f_helical_torus(x,y,z, 100, 60, 2,
         1.0, 1,
         0.5,
         0.25, 1, 1.0, 0)

These parameters were for a thick rope around the base of
a pillar:

 f_helical_torus(x,y,z, 6.0, 8, 2,
         0.5, 1,
         0.5,
         0.25, 1, 1.0, 0)

Isosurfaces are not usually considered a newusers feature
as they can be confusing, but once you get used to them
they are much more powerful than normal csg objects.

Also, if you need a mesh, I believe there are macros on
Mike's website that convert isosurfaces to meshes, but
I've not used them.

For non-circular curves, you can draw a normal
isosurface rope (f_helix1) along the path of a spline.

-Mark Slone


Post a reply to this message

From: David Robinson
Subject: Re: Circular Helix
Date: 27 Oct 2004 12:05:47
Message: <417fc75b$1@news.povray.org>
"Renderdog" <slo### [at] hiwaaynet> wrote in message
news:web.417fb7a44c4748cbff5df6e40@news.povray.org...
> "David Robinson" <tdf### [at] ezrscom> wrote:
> > Can POV nativly build a helix that wraps around itself, to form a closed
> > loop? Imagine a helix following the path of a curve.
> >
> > All I need to specify is circle diameter, helix thickness and number of
> > twists (as well as the usual colour/texture etc).
> >
> > I expect this way to be a lot quicker, if it is supported...
>
> There is an isosurface called the Helical Torus that does
> what you're looking for. Some info on the parameters
> are available at this (very excellent!) resource provided
> by Mike Williams:
>
> http://www.econym.demon.co.uk/isotut/nfunc2.htm#ht
>
> Here are a couple of helical tori you can use as starting
> points. I used the following parameter values for thin rope
> trim around a window:
>
>  f_helical_torus(x,y,z, 100, 60, 2,
>          1.0, 1,
>          0.5,
>          0.25, 1, 1.0, 0)
>
> These parameters were for a thick rope around the base of
> a pillar:
>
>  f_helical_torus(x,y,z, 6.0, 8, 2,
>          0.5, 1,
>          0.5,
>          0.25, 1, 1.0, 0)
>
> Isosurfaces are not usually considered a newusers feature
> as they can be confusing, but once you get used to them
> they are much more powerful than normal csg objects.
>
> Also, if you need a mesh, I believe there are macros on
> Mike's website that convert isosurfaces to meshes, but
> I've not used them.
>
> For non-circular curves, you can draw a normal
> isosurface rope (f_helix1) along the path of a spline.
>
> -Mark Slone
>
>
Ah, thanks for the tip. Looks good - but I'm afraid I don't understand POV
enough yet to debug this:

Parse Error: Expected 'object or directive', function identifier found
instead

So, I'm assuming either my syntax is all wrong (I literally copy/pasted) or
I should have some #include files.

Sorry about this, I'll be off everybody's back soon :)

David


Post a reply to this message

From: Renderdog
Subject: Re: Circular Helix
Date: 27 Oct 2004 12:30:00
Message: <web.417fcc974c4748cb4428009b0@news.povray.org>
"David Robinson" <tdf### [at] ezrscom> wrote:
> Ah, thanks for the tip. Looks good - but I'm afraid I don't understand POV
> enough yet to debug this:
>
> Parse Error: Expected 'object or directive', function identifier found
> instead
>
> So, I'm assuming either my syntax is all wrong (I literally copy/pasted) or
> I should have some #include files.
>
> Sorry about this, I'll be off everybody's back soon :)

An isosurface requires more than just the function, you'll
have to read the documentation to make use of the helix
functions in an isosurface.

Here's a little more to go on, but you'll probably have
difficulty with it until you play with the simpler isosurfaces
first.

#local RopeHoop = function {
 f_helical_torus(x,y,z, 100, 60, 2,
         1.0, 1,
         0.5,
         0.25, 1, 1.0, 0)
            }

isosurface {
 function { RopeHoop(x,y,z) }
 max_gradient 3.0
 contained_by { box { <0, 0, 0>, <110, 10, 75> } }
 scale 0.04
 rotate -90*x
      }


Post a reply to this message

From: David Robinson
Subject: Re: Circular Helix
Date: 27 Oct 2004 13:38:26
Message: <417fdd12$1@news.povray.org>
"Renderdog" <slo### [at] hiwaaynet> wrote in message
news:web.417fcc974c4748cb4428009b0@news.povray.org...
> "David Robinson" <tdf### [at] ezrscom> wrote:
> > Ah, thanks for the tip. Looks good - but I'm afraid I don't understand
POV
> > enough yet to debug this:
> >
> > Parse Error: Expected 'object or directive', function identifier found
> > instead
> >
> > So, I'm assuming either my syntax is all wrong (I literally copy/pasted)
or
> > I should have some #include files.
> >
> > Sorry about this, I'll be off everybody's back soon :)
>
> An isosurface requires more than just the function, you'll
> have to read the documentation to make use of the helix
> functions in an isosurface.
>
> Here's a little more to go on, but you'll probably have
> difficulty with it until you play with the simpler isosurfaces
> first.
>
> #local RopeHoop = function {
>  f_helical_torus(x,y,z, 100, 60, 2,
>          1.0, 1,
>          0.5,
>          0.25, 1, 1.0, 0)
>             }
>
> isosurface {
>  function { RopeHoop(x,y,z) }
>  max_gradient 3.0
>  contained_by { box { <0, 0, 0>, <110, 10, 75> } }
>  scale 0.04
>  rotate -90*x
>       }

Thanks a lot for the tip - nearly all sorted now. This is the code so far:

--
global_settings {
    radiosity {}
}

camera {
    location <0, 0, -5>
    look_at 0
}

background { color rgb <1, 1, 1> }
global_settings { ambient_light color rgb <0, 0, 0> }

#include "functions.inc"

#declare RopeHoop = function {
         f_helical_torus(x,y,z, 5, 7, 2,
         1.0, 1,
         0.5,
         0.25, 1, 1.0, 0)
                           }

isosurface {
 function { RopeHoop(x,y,z) }
 max_gradient 1
 contained_by { box { <0, 0, 0>, <200, 200, 200> } }
 scale 0.1
 rotate 90*x
 texture {
  pigment { color rgbf <1, 0, 0, 0> }
  finish  { ambient 1 diffuse 1 }
  }
      }
--

Only real problem right now is that it only renders 1/4 of the scene (but I
have a feeling it is more likely to be building 1/4 of the model). I've
tried playing with a couple of settings but nothing is making enough of a
difference to hit me in the face with a clue...!

I'm also trying to view this from top down.

Thanks a lot,

David


Post a reply to this message

From: Renderdog
Subject: Re: Circular Helix
Date: 27 Oct 2004 15:40:01
Message: <web.417ff8e44c4748cb250c7b0b0@news.povray.org>
"David Robinson" <tdf### [at] ezrscom> wrote:
> Only real problem right now is that it only renders 1/4 of the scene (but I
> have a feeling it is more likely to be building 1/4 of the model). I've
> tried playing with a couple of settings but nothing is making enough of a
> difference to hit me in the face with a clue...!
>
> I'm also trying to view this from top down.

The f_helical_torus is centered about <0,0,0>, so you might try
   contained_by { box { <-200, -200, -200>, <200, 200, 200> } }
to show the entire object.

f_helical_torus is a hoop about the Y axis, so to view the entire
hoop from above (camera at +Y) you might remove the
   rotate 90*x
which I used to rotate it to face the Z axis.

Finally, the
   scale 0.1
is there because I couldn't get the ratio of the rope to the hoop's
radius what I wanted without scaling the entire object.


Post a reply to this message

From: Mike Williams
Subject: Re: Circular Helix
Date: 27 Oct 2004 15:43:42
Message: <lYiq5FAKl$fBFwSo@econym.demon.co.uk>
Wasn't it David Robinson who wrote:
>
>Only real problem right now is that it only renders 1/4 of the scene (but I
>have a feeling it is more likely to be building 1/4 of the model). I've
>tried playing with a couple of settings but nothing is making enough of a
>difference to hit me in the face with a clue...!

That's because your "contained_by" box has a corner at the origin, but
the helical torus is centred at the origin. So all the bits on the
negative sides are outside the container.

Try 

 contained_by { box { -8,8 } }
 max_gradient 3


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Williams
Subject: Re: Circular Helix
Date: 27 Oct 2004 15:50:38
Message: <o46pxLAor$fBFwRF@econym.demon.co.uk>
Wasn't it Renderdog who wrote:

>There is an isosurface called the Helical Torus that does
>what you're looking for. Some info on the parameters
>are available at this (very excellent!) resource provided
>by Mike Williams:
>
>http://www.econym.demon.co.uk/isotut/nfunc2.htm#ht

I actually had no idea that the helical torus could be used to create a
circular helix. When I was developing that tutorial I experimented with
lots of different values but never happened to stumble on a set that
worked that way.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Circular Helix
Date: 27 Oct 2004 15:53:37
Message: <417ffcc1$1@news.povray.org>
I'm not sure if you want it. Tray with this code:

======================================
#declare RopeHoop = function { f_helical_torus(x,y,z, 5, 7, 2, 1.0, 1, 0.5,
0.25, 1, 1.0, 0) }

isosurface {
function { RopeHoop(x,y,z) }
max_gradient 7
contained_by { sphere { .4, 50*2 } }
translate x*10
scale 1
rotate 0*x
texture {
pigment { color rgbf <1, 0, 0, 0> }
finish  { ambient 1 diffuse 1 }
} }
======================================

Regards,
Oleguer





news:417fdd12$1@news.povray.org...
> "Renderdog" <slo### [at] hiwaaynet> wrote in message
> news:web.417fcc974c4748cb4428009b0@news.povray.org...
> > "David Robinson" <tdf### [at] ezrscom> wrote:
> > > Ah, thanks for the tip. Looks good - but I'm afraid I don't understand
> POV
> > > enough yet to debug this:
> > >
> > > Parse Error: Expected 'object or directive', function identifier found
> > > instead
> > >
> > > So, I'm assuming either my syntax is all wrong (I literally
copy/pasted)
> or
> > > I should have some #include files.
> > >
> > > Sorry about this, I'll be off everybody's back soon :)
> >
> > An isosurface requires more than just the function, you'll
> > have to read the documentation to make use of the helix
> > functions in an isosurface.
> >
> > Here's a little more to go on, but you'll probably have
> > difficulty with it until you play with the simpler isosurfaces
> > first.
> >
> > #local RopeHoop = function {
> >  f_helical_torus(x,y,z, 100, 60, 2,
> >          1.0, 1,
> >          0.5,
> >          0.25, 1, 1.0, 0)
> >             }
> >
> > isosurface {
> >  function { RopeHoop(x,y,z) }
> >  max_gradient 3.0
> >  contained_by { box { <0, 0, 0>, <110, 10, 75> } }
> >  scale 0.04
> >  rotate -90*x
> >       }
>
> Thanks a lot for the tip - nearly all sorted now. This is the code so far:
>
> --
> global_settings {
>     radiosity {}
> }
>
> camera {
>     location <0, 0, -5>
>     look_at 0
> }
>
> background { color rgb <1, 1, 1> }
> global_settings { ambient_light color rgb <0, 0, 0> }
>
> #include "functions.inc"
>
> #declare RopeHoop = function {
>          f_helical_torus(x,y,z, 5, 7, 2,
>          1.0, 1,
>          0.5,
>          0.25, 1, 1.0, 0)
>                            }
>
> isosurface {
>  function { RopeHoop(x,y,z) }
>  max_gradient 1
>  contained_by { box { <0, 0, 0>, <200, 200, 200> } }
>  scale 0.1
>  rotate 90*x
>  texture {
>   pigment { color rgbf <1, 0, 0, 0> }
>   finish  { ambient 1 diffuse 1 }
>   }
>       }
> --
>
> Only real problem right now is that it only renders 1/4 of the scene (but
I
> have a feeling it is more likely to be building 1/4 of the model). I've
> tried playing with a couple of settings but nothing is making enough of a
> difference to hit me in the face with a clue...!
>
> I'm also trying to view this from top down.
>
> Thanks a lot,
>
> David
>
>


Post a reply to this message

From: David Robinson
Subject: Re: Circular Helix
Date: 27 Oct 2004 16:01:52
Message: <417ffeb0@news.povray.org>
"Renderdog" <slo### [at] hiwaaynet> wrote in message
news:web.417ff8e44c4748cb250c7b0b0@news.povray.org...
> "David Robinson" <tdf### [at] ezrscom> wrote:
> > Only real problem right now is that it only renders 1/4 of the scene
(but I
> > have a feeling it is more likely to be building 1/4 of the model). I've
> > tried playing with a couple of settings but nothing is making enough of
a
> > difference to hit me in the face with a clue...!
> >
> > I'm also trying to view this from top down.
>
> The f_helical_torus is centered about <0,0,0>, so you might try
>    contained_by { box { <-200, -200, -200>, <200, 200, 200> } }
> to show the entire object.
>
> f_helical_torus is a hoop about the Y axis, so to view the entire
> hoop from above (camera at +Y) you might remove the
>    rotate 90*x
> which I used to rotate it to face the Z axis.
>
> Finally, the
>    scale 0.1
> is there because I couldn't get the ratio of the rope to the hoop's
> radius what I wanted without scaling the entire object.
>
Ok, I'm starting to understand it now. Thanks for everything so far :)

However, I think the Torus aspect is not quite what I had in mind, now that
I can see it in its entirety. I have attached an image to show an example if
it helps. It shows two intertwined helixes.

Hopefully this is achievable? There are going to be a number of these in the
scene, each one larger than this (and with more twists each time) - as I
say, if I export a mesh from a different program, things get unmanageable
very quickly.

Thanks again,

David


Post a reply to this message


Attachments:
Download 'double spun helix.jpg' (36 KB)

Preview of image 'double spun helix.jpg'
double spun helix.jpg


 

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.