POV-Ray : Newsgroups : povray.general : Spiral Ribbon.. Server Time
5 Nov 2024 01:24:47 EST (-0500)
  Spiral Ribbon.. (Message 1 to 7 of 7)  
From: BorisW37
Subject: Spiral Ribbon..
Date: 15 Aug 2003 17:20:01
Message: <web.3f3d4dd86201acfc6af901ee0@news.povray.org>
Is there an inc file out there, or a feature already included in Pov-Ray
that would let me easily make a Ribbon of a certain thickness and width
turned into a spiral with a certain radius and a set pitch. If you are
confused think of the DNA double helix, and the twisting ribbon. There are
2 of them in DNA, but i just need 1


Post a reply to this message

From: Mike Williams
Subject: Re: Spiral Ribbon..
Date: 15 Aug 2003 18:07:26
Message: <fT57KAAkjVP$EwPy@econym.demon.co.uk>
Wasn't it BorisW37 who wrote:
>Is there an inc file out there, or a feature already included in Pov-Ray
>that would let me easily make a Ribbon of a certain thickness and width
>turned into a spiral with a certain radius and a set pitch. If you are
>confused think of the DNA double helix, and the twisting ribbon. There are
>2 of them in DNA, but i just need 1

You could use a f_helix1 isosurface, like this:

isosurface {
  function { f_helix1(x,y,z,1,5,0.01,0.3,30,0,0) }
        max_gradient 1.5
        accuracy 0.00001
        contained_by {box {-<0.31,1,0.31>,<0.31,1,0.31>}}
        pigment {rgb x}
}

The parameters I've used in f_helix1() after the x,y,z are

1       Number of helixes (e.g. 2 for DNA double helix)
5       Period (number of turns per unit length/2Pi)
0.01    Half-thickness of ribbon
0.3     Radius of the helix
30      Ratio of ribbon width to thickness
0       Cross section shape (0=square, 1=circle, 2=diamond)
0       Cross section rotation

The x and z parameters in the size of the box container need to be at
least (Radius of helix) + (Half-thickness of ribbon) to avoid clipping.

If you want a thicker ribbon, with the same width you should decrease
the (Ratio of ribbon width to thickness), and increase the size of the
container box.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Ken
Subject: Re: Spiral Ribbon..
Date: 15 Aug 2003 23:12:50
Message: <3F3DA095.C09C0838@pacbell.net>
BorisW37 wrote:
> 
> Is there an inc file out there, or a feature already included in Pov-Ray
> that would let me easily make a Ribbon of a certain thickness and width
> turned into a spiral with a certain radius and a set pitch. If you are
> confused think of the DNA double helix, and the twisting ribbon. There are
> 2 of them in DNA, but i just need 1

? http://povray.org/resources/links/3D_Programs/Shells_Spirals_and_Helixes/

-- 
Ken Tyler


Post a reply to this message

From: BorisW37
Subject: Re: Spiral Ribbon..
Date: 16 Aug 2003 20:25:01
Message: <web.3f3ecaa75af411b36af901ee0@news.povray.org>
sorry to bother you again, but is there a way to make a spiral with a
trapezoid cross section, without rendering a lot of thin trapezoids rotated
and with a changing height?
   __
  /  \
 /    \     - Trapeziod
/______\

Ken wrote:
>
>BorisW37 wrote:
>>
>> Is there an inc file out there, or a feature already included in Pov-Ray
>> that would let me easily make a Ribbon of a certain thickness and width
>> turned into a spiral with a certain radius and a set pitch. If you are
>> confused think of the DNA double helix, and the twisting ribbon. There are
>> 2 of them in DNA, but i just need 1
>
>? http://povray.org/resources/links/3D_Programs/Shells_Spirals_and_Helixes/
>
>Ken Tyler
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: Spiral Ribbon..
Date: 16 Aug 2003 21:21:42
Message: <cjameshuff-75D06F.20184216082003@netplex.aussie.org>
In article <web.3f3ecaa75af411b36af901ee0@news.povray.org>,
 "BorisW37" <Bor### [at] yahoocom> wrote:

> sorry to bother you again, but is there a way to make a spiral with a
> trapezoid cross section, without rendering a lot of thin trapezoids rotated
> and with a changing height?

The best way I can think of to accomplish what you're trying is to use a 
mesh. There's a parametric include by Ingo that may be able to do this, 
or it would be fairly trivial to write custom code.

Ingo's page, with param.inc as well as other mesh includes and macros:
http://members.home.nl/seedseven/

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Mike Williams
Subject: Re: Spiral Ribbon..
Date: 17 Aug 2003 00:34:08
Message: <pWZmLAAmVwP$EwY6@econym.demon.co.uk>
Wasn't it BorisW37 who wrote:
>sorry to bother you again, but is there a way to make a spiral with a
>trapezoid cross section, without rendering a lot of thin trapezoids rotated
>and with a changing height?
>   __
>  /  \
> /    \     - Trapeziod
>/______\

I'm not quite sure what you mean. 
Is this anything like what you're after?

#include "functions.inc"

camera { location  <0, 1, -4> look_at <0, 0.2 0> angle 35}

light_source {<-100,200,-100> colour rgb 1}

isosurface {
 function {f_helix1(x,y,z,1,10*(2.2+y),0.05*(1.2-y),0.4*(1.2-y),1,0,0)}
   max_gradient 1.2
   contained_by{box {-<1,1,1>,<1,1,1>}}
   pigment {rgb .9}
   finish {phong 0.5 phong_size 10}
   no_shadow
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: BorisW37
Subject: Re: Spiral Ribbon..
Date: 17 Aug 2003 19:40:01
Message: <web.3f4011995af411b3f970f2fd0@news.povray.org>
not really,
i am making a thread for a screw, and am currentl using many many cones
roted around the center cylinder, with a constant radius, but with changing
height. So if you look at the cross sectioni cut of the thread it will look
like a trapezoid, or truncated cone cut in half from top to bottom.
But using many cones takes a very long time to render.


Post a reply to this message

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