POV-Ray : Newsgroups : povray.general : #declaring warps. Server Time
9 Aug 2024 23:30:44 EDT (-0400)
  #declaring warps. (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Margus Ramst
Subject: Re: #declaring warps.
Date: 27 May 2000 20:11:51
Message: <3930566E.37A530DB@peak.edu.ee>
Simen Kvaal wrote:
> 
> Am I doing it wrongly, or is it impossible to #declare a warp? Povray even
> _crashes_ when I try to get around by using a #macro.
> 

I don't think you can declare a warp. However I have no problems using it in a
macro:

#macro Foo()
    turbulence .2
#end

sphere{
    0,1
    pigment{checker rgb 1, rgb 0 Foo()}
}

Works just like expected, both in regular 3.1g and MegaPov 0.5 (Windows). What
version are you using?

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Mark Wagner
Subject: Re: #declaring warps.
Date: 28 May 2000 01:19:33
Message: <3930ac65$1@news.povray.org>
Simen Kvaal wrote in message <39301e5a@news.povray.org>...
>object
>
>    something_nice_as_well
>    pigment {
>        marble warp { Foo }
>    }
>}


You appear to have forgotten the parentheses in your macro call.  Try this:

object

    something_nice_as_well
    pigment {
        marble warp { Foo() }
    }
}


Mark


Post a reply to this message

From: Bob Hughes
Subject: Re: #declaring warps.
Date: 28 May 2000 02:20:31
Message: <3930baaf@news.povray.org>
Maybe you already realize this, cannot declare a keyword for use later.
#declare Turb=turbulence 0.4
would need to be retrieved as:
warp {turbulence Turb}  anyhow.  If that's possible to begin with anyway in a warp, I
didn't check.

Bob

"Simen Kvaal" <sim### [at] studentmatnatuiono> wrote in message
news:39301e5a@news.povray.org...
| Am I doing it wrongly, or is it impossible to #declare a warp? Povray even
| _crashes_ when I try to get around by using a #macro.
|
| I tried this:
|
| #macro Foo
| turbulence 0.4
| #end
|
| And later:
|
| object
|
|     something_nice_as_well
|     pigment {
|         marble warp { Foo }
|     }
| }
|
| This causes Povray to crash. I also tried to wrap the warp-statement as well
| into the macroa dn just calling the macro to place it like this:
|
| pigment { marble Foo }
|
| But Povray didn't like a warp in a macro.
|
| Anyone who can explain?
|
| TIA,
| Simen Kvaal.
|
|


Post a reply to this message

From: Simen Kvaal
Subject: Re: #declaring warps.
Date: 28 May 2000 05:02:58
Message: <3930e0c2$1@news.povray.org>
Mr. Wagner wrote:
>You appear to have forgotten the parentheses in your macro call.



Ah! That might be the problem. But seriously, Povray shouldn't _crash_ on
me, performing "an illegal operation", when stumbling into erroneus
scripting ...

I also find it somewhat inconsistent not to be able to #declare a warp;
what's the logical difference between a warp-block and a, say,
pigment-block? I have to say it would be very convenient to be able to do
so.

Simen.


Post a reply to this message

From: Simen Kvaal
Subject: Re: #declaring warps.
Date: 28 May 2000 05:07:30
Message: <3930e1d2@news.povray.org>
Oh no! I should have expected that! :-) But I _can_ declare you:
for example:

#declare Warp =
pigment {
    checker
    color rgb <1.0, 0.77, 0.94> // yuckish pink color for my dear Warp. ;-)
    color rgb <1.0, 0.32, 0.83> // saturate the pink, yuckish color a bit
}

*chuckle*

Simen.


>  Yes, I'm impossible to #declare.


Post a reply to this message

From: Peter Popov
Subject: Re: #declaring warps.
Date: 28 May 2000 16:20:28
Message: <90e2jsgpdgieb0odk3ka4mc35ba448jvtt@4ax.com>
On Sat, 27 May 2000 21:13:27 +0200, "Simen Kvaal"
<sim### [at] studentmatnatuiono> wrote:

>Am I doing it wrongly, or is it impossible to #declare a warp? Povray even
>_crashes_ when I try to get around by using a #macro.

Correct me if I'm wrong but a warp is a kind of transform, so have you
tried declaring it as such?


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Margus Ramst
Subject: Re: #declaring warps.
Date: 28 May 2000 21:02:44
Message: <3931B3E4.E08B3880@peak.edu.ee>
Peter Popov wrote:
> 
> Correct me if I'm wrong but a warp is a kind of transform, so have you
> tried declaring it as such?
> 

No, transform does not take a warp; it only takes general transformations
(translate, rotate, scale, matrix).

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Warp
Subject: Re: #declaring warps.
Date: 29 May 2000 09:22:43
Message: <39326f23@news.povray.org>
I would prefer:

pigment { checker Blue, White }

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Margus Ramst
Subject: Re: #declaring warps.
Date: 29 May 2000 13:42:06
Message: <39329E18.572DB220@peak.edu.ee>
Warp wrote:
> 
>   I would prefer:
> 
> pigment { checker Blue, White }
> 

pigment{
    boxed
    color_map{[.2 rgb z][.2 rgb 1]}
    warp{repeat z}
    warp{repeat x}
}

Enjoy :)

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Simen Kvaal
Subject: Re: #declaring warps.
Date: 30 May 2000 04:55:48
Message: <39338214@news.povray.org>
>pigment{
>    boxed
>    color_map{[.2 rgb z][.2 rgb 1]}
>    warp{repeat z}
>    warp{repeat x}
>}
>


Neat! I added warp{repeat y} and it made a perfect graph-paper pigment! I
can actually use it!

Simen,


>Enjoy :)

I will! hehe.


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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