POV-Ray : Newsgroups : povray.general : Flower power : Re: Flower power Server Time
4 Aug 2024 02:18:33 EDT (-0400)
  Re: Flower power  
From: Mike Williams
Date: 23 Oct 2003 13:01:45
Message: <rd7WpEAGW7l$EwZc@econym.demon.co.uk>
Wasn't it Patrick Elliott who wrote:
>
>In theory:
>
>http://mathworld.wolfram.com/StarrRose.html
>
>However, since they don't actually provide the equations for it, but 
>simply assume you know how to derive it from the 2D calcs in:

They do give the method for producing the Maurer Rose
http://icl.pku.edu.cn/yujs/MathWorld/math/m/m108.htm
which can be achieved in POV like this. My guess is that the Starr Rose
just uses some other stepping algorithm, but I can't guess what. I think
the 3d effect of the Starr is an optical illusion, and that it's
actually flat like the Maurer.

This doesn't seem to be moving in the direction of isosurface flowers.

#version 3.5;
global_settings {assumed_gamma 1.0}
camera {location  <0,0,-9> look_at <0,0,0> angle 50}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}

// ----------------------------------------
// The parameters a, n and d are the same as those on  
// http://mathworld.wolfram.com/Rose.html
// and
// http://icl.pku.edu.cn/yujs/MathWorld/math/m/m108.htm
// i.e. a = scale
//      n = petal number
//      d = step length in degrees
//
// Lines = number of lines to be drawn
// Width = width of line
//
#macro Maurer(a,n,d,Lines,Width)
 union {
 #local rad=radians(d);
 #local T=0;
 #while (T < 2*pi)
  #local r=a * sin(n*T);
  #local X=r*sin(T);
  #local Y=r*cos(T);
  #local r2=a * sin(n*T+rad);
  #local X2=r2*sin(T+rad); 
  #local Y2=r2*cos(T+rad);
  #if (X!=X2 | Y!=Y2)
    cylinder {<X,Y,0>,<X2,Y2,0>,Width}
  #end  
  #local T=T+2*pi/Lines;
 #end
 }  
#end

object {Maurer(2.1,4,120,360,0.005)
   pigment {rgb 0}
   translate -2*x
}

object {Maurer(2.1,6,72,360,0.005)
   pigment {rgb 0}
   translate 2*x
}


Post a reply to this message

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