POV-Ray : Newsgroups : povray.general : Flower power Server Time
4 Aug 2024 02:17:27 EDT (-0400)
  Flower power (Message 21 to 24 of 24)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mike Williams
Subject: Re: Flower power
Date: 25 Oct 2003 11:33:51
Message: <ivu01BAcepm$Ewjy@econym.demon.co.uk>
Wasn't it Anthony D. Baye who wrote:
>Either there's a newer version of Param.inc than the one that I found in
>the news group or there's something else going on, because I can't get it
>to render.

I believe he changed the syntax sometime early in 2002 to make it more
like 3.5 syntax. You can get the latest version from 
        <http://members.home.nl/seedseven/>
You need the "Meshmerizing Mesh Maker Macros" file, and from the zip you
need param.inc and makemesh.inc.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Patrick Elliott
Subject: Re: Flower power
Date: 25 Oct 2003 15:30:26
Message: <MPG.1a047b4117720b7098990a@news.povray.org>
In article <93SzzCAtBhm$EwAC@econym.demon.co.uk>, 
nos### [at] econymdemoncouk says...
> 
> And how about this for a Dahlia?
> 

Hmm. That actually works better than the StarrRose, which really needs to 
bend inward to form more of a bell shape. Wish I had any where near as 
much understanding of the math as you...

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Dave Matthews
Subject: Re: Flower power
Date: 27 Oct 2003 08:15:01
Message: <web.3f9d1a24a022f3b88062416c0@news.povray.org>
Mike Williams wrote:
>And how about this for a Dahlia?
>
Very Nice.

Dave Matthews


Post a reply to this message

From: David Wallace
Subject: Re: Flower power
Date: 28 Oct 2003 19:28:29
Message: <3f9f09ad@news.povray.org>
Here is a blank for a parametric object include file:

// Parametric variable form

#declare uMin = 0; // Minimum u value
#declare uMax = pi; // Maximum u value
#declare uNum = 45; // Number of points in u direction
#declare uWrap = 0; // u wraps around if != 0
#declare uSeed = 7335; // Random number seed for u parameter

#declare vMin = 0; // Minimum v value
#declare vMax = radians(359); // Maximum v value
#declare vNum = 360; // Number of points in v direction
#declare vWrap = 1; // v wraps around if != 0
#declare vSeed = 2252; // Random number seed for v parameter

#declare IsRnd = true; // True if random number used
#declare IsUV = false; // True if object is to be UV-mapped

#declare Smooth = 0; // Smooth flag

#declare Detail = "Partial"
/* Detail values
  Verbose = Line by line details
  Partial = Operations only
  Other = Filename only
*/

/* For all macro functions
 i = Current value of u parameter
 j = Current value of v parameter
 p = Current value of u variance (0...1)
 q = Current value of v variance (0...1)
 vc= Current 3D point
*/

// Optional variables and subfunctions

// point function
#macro pnt(i, j, p, q)
 #local xp = sin(i)*cos(j);
 #local yp = pow(cos(i)+1, 2);
 #local zp = sin(i)*sin(j);
 #local pt0 = <xp,yp,zp>*(1+0.1*q);

 pt0
#end

How would a rose be defined using this format?  The include file may contain
#declare and #local variables as well as other #macros.

"Dave Matthews" <dma### [at] wrmnwestmnscuedu> wrote in message
news:web.3f9927d7a022f3b88062416c0@news.povray.org...
> Mike Williams wrote:
> >Wasn't it Patrick Elliott who wrote:
> >
> >> I would love to actually know how they got that StarrRose. :(
> >
> >If you feel strongly enough about it to go out and buy the book that
> >they got the equation from, then perhaps you could let us know.
> >
> >Mike Williams
> >Gentleman of Leisure
> >
> No need, someone already has the book.
>
> What's going on here is a simple parametric curve, "doctored up" to look
3D.
>  But we can do something similar in PovRay.
>
> The radius varies according to a set function:  2 + sin(At)/2, creating an
> "opened-up" rose.
>
> The twist is that the angle, rather than simply proceeding
counter-clockwise
> around the circle, backs up on itself, NewT = t + Sin(Bt)/C, so that we
> have the modified parametric equations:
>
> x = r(t)cos(NewT), y = r(t)sin(NewT).
>
> All of the shading is done by connecting the origin to the edge of the
> curve, then shrinking and superimposing repeated copies of the image on
> itself.
>
> We can get one version of this by letting the vertical (y) component vary
> according to r(t).
>
> //Starr Rose For PovRay
>
> #version 3.5;
>
> #global_settings { assumed_gamma 1.0 }
>
> camera {        angle 50
>                 right x*image_width/image_height
>                 location <0, 50, 0>
>                 look_at <0, 0, 0>
>         }
>
> light_source { <800, 1200, -500> color rgb <1, 1, 1> }
>
> #macro Starr_Rose(A, B, C, N)
>
>   #local Radius= function(Theta) {2 + sin(A*Theta)/2}
>   #local AngleShift = function(Theta) {sin(B*Theta)/C}
>
>   #local Angle = 0;
>
>   #local Cycle = 2*pi;
>   union {
>   #while (Angle <= Cycle)
>        #local X = Radius(Angle)*cos(Angle + AngleShift(Angle));
>        #local Z = Radius(Angle)*sin(Angle + AngleShift(Angle));
>        #local Y = 2 - Radius(Angle) ;
>        cylinder { <0, 0, 0>, <X, Y, Z>, 0.05 }
>
>     #local Angle = Angle + Cycle/N;
>
>   #end
>     }
> #end
>
>
>
> object { Starr_Rose(6, 18, 18, 500) texture { pigment { color rgb <1, 0,
0>
> } }
>                                     scale 5}
>
> /////////////////End of Code
>
> I'm guessing that one of you with more experience at POVRay can do up a
> better version, but this gives the idea.
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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