|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This scene works perfectly in MegaPov. It's the *lightflow thingy* made by
Warp.
Parse Error: Expected 'operand', sqr found instead.
isosurface
{ function
/* here error occurs---> */ {
sqrt(sqr(sqrt(sqr(x)+sqr(z))-1.5)+sqr(y))-(.3+.2*sin(8*atan2(x,z))) }
contained_by { box { -<2,.5,2.1>,<2,.7,2> } }
max_gradient 2.41 accuracy 10^-3
translate .5*y
pigment {rgb 1}
scale .7}
camera { location <-2,3,-3> look_at 0 }
light_source
{ <4,5,-5> rgb 3/2
}
plane
{ y,0
pigment { rgb 1 }
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
JRG <jrg### [at] hotmailcom> wrote:
: Parse Error: Expected 'operand', sqr found instead.
The sqr() function doesn't exist. Use ^2 instead (it shouldn't be any
slower).
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 6 Sep 2001 15:20:11 +0200, JRG wrote:
>This scene works perfectly in MegaPov. It's the *lightflow thingy* made by
>Warp.
>
>Parse Error: Expected 'operand', sqr found instead.
POV 3.5 is not MegaPOV. POV 3.5 does not have a "sqr" function.
--
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
But I tried to define a sqr macro as follows:
#macro sqr(A)
A*A
#end
and I got
Parse Error: Expected 'undeclared identifier', sqr found instead.
"Ron Parker" <ron### [at] povrayorg> ha scritto nel messaggio
news:slr### [at] fwicom...
> On Thu, 6 Sep 2001 15:20:11 +0200, JRG wrote:
> >This scene works perfectly in MegaPov. It's the *lightflow thingy* made
by
> >Warp.
> >
> >Parse Error: Expected 'operand', sqr found instead.
>
> POV 3.5 is not MegaPOV. POV 3.5 does not have a "sqr" function.
>
> --
> #local R=<7084844682857967,0787982,826975826580>;#macro
L(P)concat(#while(P)chr(
> mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf
L(R.x)L(R.y)0,0
> translate<-.8,0,-1>}text{ttf
L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
> 4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody
else's
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 6 Sep 2001 15:26:50 +0200, JRG wrote:
>But I tried to define a sqr macro as follows:
>
>#macro sqr(A)
>A*A
>#end
>
>and I got
>
>Parse Error: Expected 'undeclared identifier', sqr found instead.
What if you define it as a function instead, since that's what you really
want?
--
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker <ron### [at] povrayorg> wrote:
: What if you define it as a function instead, since that's what you really
: want?
Actually this has been done already: f_sqr() in math.inc.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <slr### [at] fwicom> , ron### [at] povrayorg (Ron
Parker) wrote:
>>But I tried to define a sqr macro as follows:
>>
>>#macro sqr(A)
>>A*A
>>#end
>>
>>and I got
>>
>>Parse Error: Expected 'undeclared identifier', sqr found instead.
>
> What if you define it as a function instead, since that's what you really
> want?
I would not recommend using a function for such a simple case. It will work
for sure, but there is some overhead involved that (if used carelessly) can
slow down rendering of isosurfaces a lot. The built-in operators should be
used whenever possible as they offer by far the best performance.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|