POV-Ray : Newsgroups : povray.newusers : sin in sor or lathe Server Time
8 Jul 2024 10:06:17 EDT (-0400)
  sin in sor or lathe (Message 1 to 4 of 4)  
From: McMinty
Subject: sin in sor or lathe
Date: 5 Aug 2009 16:40:00
Message: <web.4a79ec1572ab07797576e0550@news.povray.org>
Hi,

I have a strange problem, where I were not able to find a solution on the net so
far.

When I use a "sin(...)" in a sor- or lathe-object, the argument of the function
cannot exceed Pi.

For Example:

sor{5,
     <1,2>,
     <sin(3),3>,
     <sin((1.001-0.001)*Pi),5>,
     <4,6>,
     <1,7>
     pigment{color Blue}
}

this works fine, but with

sor{5,
     <1,2>,
     <sin(3),3>,
     <sin(1.001*Pi),5>,
     <4,6>,
     <1,7>
     pigment{color Blue}
}

I get the error message:
"Parse error: Incorrect point in sor."

I used a self-defined Pi in this example, but even without "sin(3)" works,
"sin(3.15)" and bigger arguments do not work.
Even if I have a macro which calculates the sine

#macro Sine(x)
#declare Global_Value=sin(x);
#end

and put "Global_Value" within the brackets of the coordinates in sor (or lathe)
I have the exact same effect.
If I use a sine for the position of a light source for example, I can put in
every argument.


I am using Povray 3.6.1 from the ubuntu repository and I also tried it with the
same result on a windows machine and Povray 3.6.2.


Any suggestions?


Cheers
McMinty


Post a reply to this message

From: clipka
Subject: Re: sin in sor or lathe
Date: 5 Aug 2009 17:20:10
Message: <4a79f78a$1@news.povray.org>
McMinty schrieb:
> Hi,
>
> I have a strange problem, where I were not able to find a solution on the net so
> far.
>
> When I use a "sin(...)" in a sor- or lathe-object, the argument of the function
> cannot exceed Pi.
>   

This is not a problem with the sin function per se, but with its 
function result becoming negative, which sor and lathe will refuse to 
accept in the X coordinate. For instance, the following should work 
perfectly:

sor{5,
    <1,2>,
    <1+sin(3),3>,
    <1+sin(1.001*Pi),5>,
    <4,6>,
    <1,7>
    pigment{color Blue}
}


Post a reply to this message

From: Chris B
Subject: Re: sin in sor or lathe
Date: 6 Aug 2009 02:45:23
Message: <4a7a7c03@news.povray.org>
"clipka" <ano### [at] anonymousorg> wrote in message 
news:4a79f78a$1@news.povray.org...
> McMinty schrieb:
>> Hi,
>>
>> When I use a "sin(...)" in a sor- or lathe-object, the argument of the 
>> function
>> cannot exceed Pi.
>>
>
> This is not a problem with the sin function per se, but with its function 
> result becoming negative, which sor and lathe will refuse to accept in the 
> X coordinate. For instance, the following should work perfectly:
>
> sor{5,
>    <1,2>,
>    <1+sin(3),3>,
>    <1+sin(1.001*Pi),5>,
>    <4,6>,
>    <1,7>
>    pigment{color Blue}
> }

You can also use  abs(sin(,,,))  if you want the points to effectively 
'straddle' the y-axis as an alternative to thickening out the core of the 
generated object.

Regards,
Chris B.


Post a reply to this message

From: McMinty
Subject: Re: sin in sor or lathe
Date: 6 Aug 2009 03:30:01
Message: <web.4a7a85bd3d938f37937b60f60@news.povray.org>
Thanks,

this shows again that I should read the docs more carefully.


Cheers
McMinty


Post a reply to this message

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