POV-Ray : Newsgroups : povray.advanced-users : modulo / math funktions Server Time
25 Nov 2024 23:39:49 EST (-0500)
  modulo / math funktions (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: marabou
Subject: modulo / math funktions
Date: 29 Oct 2001 11:03:45
Message: <3bdd7de1@news.povray.org>
hello, 

in the manual i did not find any hind about this:
what is the function-call for modulo?
is it all similar to c(++)?

thanks


Post a reply to this message

From: marabou
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 11:06:02
Message: <3bdd7e6a@news.povray.org>
marabou wrote:

> 
> hello,
> 
> in the manual i did not find any hind about this:
> what is the function-call for modulo?
> is it all similar to c(++)?
> 
> thanks

sorry for my pronounciation. i ment <hint>.

i want to make a construct like this:

        #if (mod((cm*100)/1) = 0)
        [...]
        #else
        [...]
        #end


Post a reply to this message

From:
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 11:17:12
Message: <d20rtt86q3gfsa1h8jb8fm54u682lfaii9@4ax.com>
On Mon, 29 Oct 2001 17:06:50 +0100, marabou <not### [at] availableyet> wrote:

> i want to make a construct like this:
>
>        #if (mod((cm*100)/1) = 0)
>        [...]
>        #else
>        [...]
>        #end

I think you have POV-Ray installed with documentation but if not (POV
3.5 allow to not instal doc) please look at
http://www.povray.org/working-docs/id000135.html#6_1_3_6 - there is
list of float functions (also mod) for current beta version of POV 3.5
but most of them (i.e. mod) works fine with erlier versions.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: marabou
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 11:22:17
Message: <3bdd8238@news.povray.org>
that was it. thank you very well.



> On Mon, 29 Oct 2001 17:06:50 +0100, marabou <not### [at] availableyet> wrote:
> 
>> i want to make a construct like this:
>>
>>        #if (mod((cm*100)/1) = 0)
>>        [...]
>>        #else
>>        [...]
>>        #end
> 
> I think you have POV-Ray installed with documentation but if not (POV
> 3.5 allow to not instal doc) please look at
> http://www.povray.org/working-docs/id000135.html#6_1_3_6 - there is
> list of float functions (also mod) for current beta version of POV 3.5
> but most of them (i.e. mod) works fine with erlier versions.
> 
> ABX
> --
> #declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb
> #1}}
> union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{
> //ABX
> 
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
> contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient
> 1}}//POV35


Post a reply to this message

From:
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 11:25:02
Message: <bj0rttsen87jqdpfen56p8450jmkva6q8o@4ax.com>
On Mon, 29 Oct 2001 17:23:04 +0100, marabou <not### [at] availableyet> wrote:

> that was it. thank you very well.

BTW: there are much more advanced questions within
povray.newusers group :-)

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Warp
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 13:07:06
Message: <3bdd9aca@news.povray.org>

: BTW: there are much more advanced questions within
: povray.newusers group :-)

  Which raises a question: Why do people post trivial questions in this
group? They should know that asking the syntax for a trivial function is
far from advanced.

-- 
#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

From: Ron Parker
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 13:20:32
Message: <slrn9tr7fi.av0.ron.parker@fwi.com>
On 29 Oct 2001 13:07:06 -0500, Warp wrote:

>: BTW: there are much more advanced questions within
>: povray.newusers group :-)
> 
>   Which raises a question: Why do people post trivial questions in this
> group? They should know that asking the syntax for a trivial function is
> far from advanced.

The usual thinking seems to go "well, this is where the advanced users
hang out, so someone here is sure to know the answer to my question."

Either that or the definition of advanced is "anyone more advanced than
me."


-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Slime
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 14:46:11
Message: <3bddb203$1@news.povray.org>
Of course, then you've got the other extreme, where people think "My
question isn't advanced enough for this group," and it may or may not be
true, but I think it results in this group being very infrequently posted
to. What *would* qualify as an advanced question or discussion topic?

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On 29 Oct 2001 13:07:06 -0500, Warp wrote:

> >: BTW: there are much more advanced questions within
> >: povray.newusers group :-)
> >
> >   Which raises a question: Why do people post trivial questions in this
> > group? They should know that asking the syntax for a trivial function is
> > far from advanced.
>
> The usual thinking seems to go "well, this is where the advanced users
> hang out, so someone here is sure to know the answer to my question."
>
> Either that or the definition of advanced is "anyone more advanced than
> me."
>
>
> --
> #macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z
a-z)R(a
> -z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F
T)merge{
> P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission
3-T}}}#end
> Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: marabou
Subject: Re: modulo / math funktions
Date: 29 Oct 2001 15:11:42
Message: <3bddb7fc@news.povray.org>
Warp wrote:


> : BTW: there are much more advanced questions within
> : povray.newusers group :-)
> 
>   Which raises a question: Why do people post trivial questions in this
> group? They should know that asking the syntax for a trivial function is
> far from advanced.
> 
BTW: until i do not have installed ht:dig it is a hard job to "fight 
through the fucking manual". rtfm turns to ftfm ;-)
an interesting interesting thing is: where is the border to an advanced 
question. (but no discussion about it please, i will post to newusers 
futurely.)


Post a reply to this message

From: Warp
Subject: Re: modulo / math funktions
Date: 30 Oct 2001 03:56:23
Message: <3bde6b36@news.povray.org>
Slime <noo### [at] hotmailcom> wrote:
: What *would* qualify as an advanced question or discussion topic?

  "How do I calculate the normal vector of an isosurface function at a
certain point <x,y,z>?", for example.

-- 
#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

Goto Latest 10 Messages Next 9 Messages >>>

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