|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3f9927d7a022f3b88062416c0@news.povray.org>,
dma### [at] wrmnwestmnscuedu says...
> 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.
>
Oooh! Nice! Now if someone could find a way to tweak it so it makes the
petals more petal like. But that is way more than I could have ever
managed. lol
--
void main () {
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3F9804C7.2CC33998@Rapidnet.com>,
"Anthony D. Baye" <ban### [at] Rapidnetcom> wrote:
> Does anyone know where I might find a dxf or obj model of, say, a
> lotus? I don't understand half of the math that was just thrown around
> here, and I can't afford the one patch modeller I've been able to find
> for the Mac.
One? MeshWork is $30 shareware: http://codenautics.com/meshwork/
PatchDance is free: http://www.patchdance.com/
jPatch is free:
http://jpatch.sourceforge.net/?page=platforms
Other modellers (free):
Mondfarilo: http://userpages.itis.com/philip/
Art Of Illusion: http://www.artofillusion.org/
And more...
If you have OS X, you can also run most Linux modellers.
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Patrick Elliott who wrote:
>Oooh! Nice! Now if someone could find a way to tweak it so it makes the
>petals more petal like. But that is way more than I could have ever
>managed. lol
Now we have the formula, we can turn that into a parametric isosurface.
Then we can do things like adding noise to make it less perfectly
symmetrical.
//Starr Rose For PovRay
#version 3.5;
#declare A=6; // Number of petals
#declare B=3*A; // Ripple frequency
#declare C=B; // Ripple strength (inverse)
#declare Approx = true; // true = use Ingo's param.inc approximation
// false = use parametric isosurface
#declare Noise = 0.3; // Amount of noise
global_settings {assumed_gamma 1.0}
camera {location <0,0,-10> look_at <0,0,0> angle 40}
background {rgb 1}
light_source {<-10, 10, -30> color rgb 1}
#include "functions.inc"
#declare Radius = function(Theta) {2 + sin(A*Theta)/2}
#declare AngleShift = function(Theta) {sin(B*Theta)/C}
#declare Fx = function(u,v) {Radius(u) * cos(u + AngleShift(u)) * v}
#declare Fy = function(u,v) {Radius(u) * sin(u + AngleShift(u)) * v}
#declare Fz = function(u,v) {2 - Radius(u) +
f_noise3d(u*10,v*5,0)*Noise}
#if (Approx)
#include "param.inc"
#if (Noise = 0)
#declare U=500;
#declare V=1;
#else
#declare U=200;
#declare V=20;
#end
object {
Parametric(Fx,Fy,Fz,<0,0>,<2*pi,1>,U,V,"")
pigment {rgb x}
finish {phong 0.5 phong_size 10}
}
#else
parametric {
function {Fx(u,v)}
function {Fy(u,v)}
function {Fz(u,v)}
<0,0>,<2*pi,1>
max_gradient 2
contained_by{box{<-2.6,-2.6,-0.5><2.6,2.6,0.5>}}
pigment {rgb x}
finish {phong 0.5 phong_size 10}
}
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And how about this for a Dahlia?
I've removed the option to use a real parametric isosurface because it
was taking too long to render - it now requires Ingo Janssen's
param.inc.
//Dahlia
#version 3.5;
#declare W=4; // Winding number
#declare A=9.4; // Number of petals per wind
#declare B=2*A; // Ripple frequency
#declare C=B*2; // Ripple strength (inverse)
#declare Noise = 0.3; // Amount of noise
#declare WW = 2*pi*W;
#declare Q=WW*1.5;
global_settings {assumed_gamma 1.0}
camera {location <0,0,-10> look_at <0,0,0> angle 40}
background {rgb 1}
light_source {<-10, 10, -30> color rgb 1}
#include "functions.inc"
#declare Radius = function(Theta) {2 + sin(A*(Theta-pi/2))/2}
#declare AngleShift = function(Theta) {sin(B*(Theta-pi/2))/C}
#declare Fx = function(u,v) {Radius(u) *
cos(u + AngleShift(u)) * v *(1-u/Q)}
#declare Fy = function(u,v) {Radius(u) *
sin(u + AngleShift(u)) * v *(1-u/Q)}
#declare Fz = function(u,v) {2 - Radius(u)
+ f_noise3d(u*10,v*5,0)*Noise - u/WW}
#include "param.inc"
#if (Noise = 0)
#declare U=500*W;
#declare V=1;
#else
#declare U=200*W;
#declare V=20;
#end
object {
Parametric(Fx,Fy,Fz,<0,0>,<WW,1>,U,V,"")
pigment {onion
colour_map {
[0.5 rgb <1,1,0>]
[0.8 rgb <1,0,0>]
}
scale <2.5,2.5,2>
}
finish {phong 0.5 phong_size 10}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
A.D.B.
Mike Williams wrote:
> And how about this for a Dahlia?
>
> I've removed the option to use a real parametric isosurface because it
> was taking too long to render - it now requires Ingo Janssen's
> param.inc.
>
> //Dahlia
> #version 3.5;
>
> #declare W=4; // Winding number
> #declare A=9.4; // Number of petals per wind
> #declare B=2*A; // Ripple frequency
> #declare C=B*2; // Ripple strength (inverse)
> #declare Noise = 0.3; // Amount of noise
>
> #declare WW = 2*pi*W;
> #declare Q=WW*1.5;
>
> global_settings {assumed_gamma 1.0}
> camera {location <0,0,-10> look_at <0,0,0> angle 40}
> background {rgb 1}
> light_source {<-10, 10, -30> color rgb 1}
> #include "functions.inc"
>
> #declare Radius = function(Theta) {2 + sin(A*(Theta-pi/2))/2}
> #declare AngleShift = function(Theta) {sin(B*(Theta-pi/2))/C}
>
> #declare Fx = function(u,v) {Radius(u) *
> cos(u + AngleShift(u)) * v *(1-u/Q)}
> #declare Fy = function(u,v) {Radius(u) *
> sin(u + AngleShift(u)) * v *(1-u/Q)}
> #declare Fz = function(u,v) {2 - Radius(u)
> + f_noise3d(u*10,v*5,0)*Noise - u/WW}
>
> #include "param.inc"
> #if (Noise = 0)
> #declare U=500*W;
> #declare V=1;
> #else
> #declare U=200*W;
> #declare V=20;
> #end
> object {
> Parametric(Fx,Fy,Fz,<0,0>,<WW,1>,U,V,"")
> pigment {onion
> colour_map {
> [0.5 rgb <1,1,0>]
> [0.8 rgb <1,0,0>]
> }
> scale <2.5,2.5,2>
> }
> finish {phong 0.5 phong_size 10}
> }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams wrote:
>And how about this for a Dahlia?
>
Very Nice.
Dave Matthews
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|