 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Does anybody know how to design a flower using an IsoSurface? (Is this
even possible?)
I only need the flower itself, not the stem.
Anthony D. Baye.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Anthony D. Baye" <ban### [at] Rapidnet com> wrote in message
news:3F962693.84387F65@Rapidnet.com...
> Does anybody know how to design a flower using an IsoSurface? (Is this
> even possible?)
> I only need the flower itself, not the stem.
How elaborate a flower? Unrealistic daisy is simple. Realistic rose much
more difficult. At least from what I'm thinking it would be.
The daisy could be a radial pattern, like so:
function {
pattern {
radial
scallop_wave frequency 6 // shape and number of petals
rotate 90*x
}
}
Then used as:
isosurface {
function {
(x*x+y*y+z*z) // sphere shape
-
FlowerPattern(x,y,z)
}
contained_by {
box {<-1,-1,-0.1>,<1,1,0.1>} // middle slice
}
pigment {
spherical
color_map {
[0.75 color rgb <1,1,1>]
[0.8 color rgb <1,1,0>]
}
}
}
--
Bob H.
http://www.3digitaleyes.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I was thinking, like a rose or something.
Anthony D. Baye
"Hughes, B." wrote:
> "Anthony D. Baye" <ban### [at] Rapidnet com> wrote in message
> news:3F962693.84387F65@Rapidnet.com...
> > Does anybody know how to design a flower using an IsoSurface? (Is this
> > even possible?)
> > I only need the flower itself, not the stem.
>
> How elaborate a flower? Unrealistic daisy is simple. Realistic rose much
> more difficult. At least from what I'm thinking it would be.
>
> The daisy could be a radial pattern, like so:
>
> function {
> pattern {
> radial
> scallop_wave frequency 6 // shape and number of petals
> rotate 90*x
> }
> }
>
> Then used as:
>
> isosurface {
> function {
> (x*x+y*y+z*z) // sphere shape
> -
> FlowerPattern(x,y,z)
> }
> contained_by {
> box {<-1,-1,-0.1>,<1,1,0.1>} // middle slice
> }
> pigment {
> spherical
> color_map {
> [0.75 color rgb <1,1,1>]
> [0.8 color rgb <1,1,0>]
> }
> }
> }
>
> --
> Bob H.
> http://www.3digitaleyes.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Anthony D. Baye" <ban### [at] Rapidnet com> wrote in message
news:3F96F97F.FB04E35D@Rapidnet.com...
> I was thinking, like a rose or something.
Suspected so, and although maybe there's some way to cobble together some
patterns I would expect a mathematical formulation could ultimately be the
answer you're looking for.
I'm probably not going to be the one who might provide that, sorry. I did
get an ugly rose-like thing using the onion pattern, having frequency of 4
and scaled larger in one direction; also turbulated a little. :-)
I had thought this might be something already done by someone before but I
sure can't locate anything concerning a isosurface flower. I suppose I'm
thinking of meshes.
--
Bob H.
http://www.3digitaleyes.com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3f971c0a$1@news.povray.org>,
"Hughes, B." <omn### [at] charter net> wrote:
> I had thought this might be something already done by someone before but I
> sure can't locate anything concerning a isosurface flower. I suppose I'm
> thinking of meshes.
I did this a *long* time ago, when I was first playing around with
isosurfaces. It was basically an extremely distorted sphere function,
and looked a bit like a fat rose. A mesh certainly seems like a better
choice, however.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cja### [at] netplex aussie org>,
cja### [at] earthlink net says...
> In article <3f971c0a$1@news.povray.org>,
> "Hughes, B." <omn### [at] charter net> wrote:
>
> > I had thought this might be something already done by someone before but I
> > sure can't locate anything concerning a isosurface flower. I suppose I'm
> > thinking of meshes.
>
> I did this a *long* time ago, when I was first playing around with
> isosurfaces. It was basically an extremely distorted sphere function,
> and looked a bit like a fat rose. A mesh certainly seems like a better
> choice, however.
>
>
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:
http://mathworld.wolfram.com/Rose.html
It isn't very helpful. Especially since I can't figure out what 'a' needs
to be or do to make Rose calcs work right either....
In my case I am trying to do something like:
N = 5 * rnd
vdelta = 2 * PI * rnd
vector = a * sin(N * vdelta)
X = cos(vector) * 30
Y = sin(vector) * 30
The problem is all I get is a dang circle... It is driving me batty. If
it was for something in POV, it would be driving me even more nuts. But
man would the StarrRose make a real nice Isosurface. Sigh...
--
void main () {
If Schrödingers_cat is alive
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wasn't it Patrick Elliott who wrote:
>In my case I am trying to do something like:
>
>N = 5 * rnd
>vdelta = 2 * PI * rnd
>vector = a * sin(N * vdelta)
>X = cos(vector) * 30
>Y = sin(vector) * 30
>
>The problem is all I get is a dang circle... It is driving me batty. If
>it was for something in POV, it would be driving me even more nuts. But
>man would the StarrRose make a real nice Isosurface. Sigh...
I think that N should be a constant (it's the number of petals or half
the number of petals depending on whether it's odd or even) and X and Y
should be cos(vdelta)*vector and sin(vdelta)*vector. "a" is a scaling
factor, the maximum radius of the whole shape
So:-
#version 3.5;
global_settings {assumed_gamma 1.0}
camera {location <0,0,-10> look_at <0,0,0> angle 50}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}
#declare rnd=0;
#declare N = 5;
#declare a=3;
#while (rnd < 1)
#declare vdelta = 2 * pi * rnd;
#declare vector = a * sin(N * vdelta);
#declare X = cos(vdelta) * vector;
#declare Y = sin(vdelta) * vector;
sphere {<X,Y,0>,0.2 pigment {rgb <1,1,0>}}
#declare rnd = rnd + 0.001;
#end
If we bung the significant bit "vector = a * sin(N * vdelta)" into an
isosurface it looks like this "a * sin(N * f_th(x,z,y))", which doesn't
do anything useful on it's own but suggests something like this:-
#version 3.5;
global_settings {assumed_gamma 1.0}
camera { location <-1, 1, -6> look_at <0, 0, 0> angle 50}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}
#include "functions.inc"
#declare n = 5;
#declare a = 2;
isosurface {
function { a * sin(n*f_th(x,z,y)) * f_sphere(x,y,z,a) + 0.1}
max_gradient 20
contained_by{sphere{0,a}}
pigment {rgb .9}
finish {phong 0.5 phong_size 10}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wasn't it Hughes, B. who wrote:
>How elaborate a flower? Unrealistic daisy is simple. Realistic rose much
>more difficult. At least from what I'm thinking it would be.
>
>The daisy could be a radial pattern, like so:
>
That could be made a little more realistic, like:-
#version 3.5;
global_settings {assumed_gamma 1.0}
camera {location <-1,0,-2> look_at <0,0,0> angle 50}
background {rgb 1}
light_source {<-10, 10, -30> color rgb 1}
#include "functions.inc"
#declare FlowerPattern =
function {
pattern {
radial
scallop_wave frequency 6 // shape and number of petals
rotate 90*x
}
}
isosurface {
function {
(x*x+y*y+z*z*20) // sphere shape
-
FlowerPattern(x,y,z)
+ f_noise3d(x*6,y*6,0)*0.5
}
contained_by {
box {<-1,-1,0>,<1,1,0.4>}
}
open
max_gradient 20
pigment {
cylindrical
color_map {
[0.2 color rgb <1,0.7,0.7>]
[0.25 color rgb <1,1,1>]
}
rotate x*90
}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Patrick Elliott 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:
>
>http://mathworld.wolfram.com/Rose.html
>
You can extend 2D polar functions to 3D in a variety of ways. One is via
spherical products.
See:
http://news.povray.org/povray.binaries.images/32476/
for a few examples. I use Ingo's "param.inc" and turn everything into
meshes, since it's faster, but you could also use the "parametric" object
from POVRay.
I don't know if this will give you what you want, but it does give some
rather interesting "3D mathematical flowers."
Dave Matthews
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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.
A.D.B
"Anthony D. Baye" wrote:
> Does anybody know how to design a flower using an IsoSurface? (Is this
> even possible?)
> I only need the flower itself, not the stem.
>
> Anthony D. Baye.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <KwnOiDA022l$EwP5@econym.demon.co.uk>,
nos### [at] econym demon co uk says...
> Wasn't it Patrick Elliott who wrote:
>
> >In my case I am trying to do something like:
> >
> >N = 5 * rnd
> >vdelta = 2 * PI * rnd
> >vector = a * sin(N * vdelta)
> >X = cos(vector) * 30
> >Y = sin(vector) * 30
> >
> >The problem is all I get is a dang circle... It is driving me batty. If
> >it was for something in POV, it would be driving me even more nuts. But
> >man would the StarrRose make a real nice Isosurface. Sigh...
>
> I think that N should be a constant (it's the number of petals or half
> the number of petals depending on whether it's odd or even) and X and Y
> should be cos(vdelta)*vector and sin(vdelta)*vector. "a" is a scaling
> factor, the maximum radius of the whole shape
>
> So:-
>
> #version 3.5;
> global_settings {assumed_gamma 1.0}
> camera {location <0,0,-10> look_at <0,0,0> angle 50}
> background {rgb 1}
> light_source {<-30, 100, -30> color rgb 1}
>
> #declare rnd=0;
> #declare N = 5;
> #declare a=3;
> #while (rnd < 1)
> #declare vdelta = 2 * pi * rnd;
> #declare vector = a * sin(N * vdelta);
> #declare X = cos(vdelta) * vector;
> #declare Y = sin(vdelta) * vector;
> sphere {<X,Y,0>,0.2 pigment {rgb <1,1,0>}}
> #declare rnd = rnd + 0.001;
> #end
Heh! That works. Was screwed up on the correct way to convert polar to
rectangular. :p
>
> If we bung the significant bit "vector = a * sin(N * vdelta)" into an
> isosurface it looks like this "a * sin(N * f_th(x,z,y))", which doesn't
> do anything useful on it's own but suggests something like this:-
>
> #version 3.5;
> global_settings {assumed_gamma 1.0}
> camera { location <-1, 1, -6> look_at <0, 0, 0> angle 50}
> background {rgb 1}
> light_source {<-30, 100, -30> color rgb 1}
> #include "functions.inc"
>
> #declare n = 5;
> #declare a = 2;
> isosurface {
> function { a * sin(n*f_th(x,z,y)) * f_sphere(x,y,z,a) + 0.1}
> max_gradient 20
> contained_by{sphere{0,a}}
> pigment {rgb .9}
> finish {phong 0.5 phong_size 10}
> }
>
Yeah. I wondered about shoe horning a useful Z axis into that. The
StarrRose uses a, b and c as scales, which I think implies it already
accounts for z, but lacking the equations to define how those are used...
:p
Like I said though, my own problem wasn't for use in POV, I just thought
I would ask about it, since the two things are closely related, at least
with respect to the basic equations. I am actually designing an ActiveX
control that generates a 2D firework. The X and Y are used as velocity
vectors so that all the points starts at a central position and drift
outward, losing X velocity slightly and gaining Y velocity towards the
ground with each time is draws. Works nice for stuff I could make work
right, but I completely missed the obvious fact that with X = cos(Delta)
* r and Y = sin(Delta) * r, r was actually what I had as 'vector'.
Sigh... Shows you how much I know about math..
However, I stand by the statement that, as a reference sight for
equations, the fact that this site seem to be the 'only' one with a
decent list doesn't mean it is a complete or accurate one. I would love
to actually know how they got that StarrRose. :(
--
void main () {
If Schrödingers_cat is alive
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <rd7WpEAGW7l$EwZc@econym.demon.co.uk>,
nos### [at] econym demon co uk says...
> 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.
>
Yeah. Someone that is a math wiz suggested that may be the case. I think
if you knew what you where doing you could fudge it though. Use one of
those calcs that produce:
---\
\---
for the z axis some how with the current radius from the center defining
where on that path the point lies. I have no clue how to manage it
though. However, I would think it would be possible. How well it
would works is another matter.
--
void main () {
If Schrödingers_cat is alive
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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] wr mnwest mnscu edu 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 () {
If Schrödingers_cat is alive
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3F9804C7.2CC33998@Rapidnet.com>,
"Anthony D. Baye" <ban### [at] Rapidnet com> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
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] econym demon co uk 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 () {
If Schrödingers_cat is alive
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] wr mnwest mnscu edu> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |