POV-Ray : Newsgroups : povray.advanced-users : isosurface - moving pattern Server Time
1 Nov 2024 07:25:06 EDT (-0400)
  isosurface - moving pattern (Message 1 to 7 of 7)  
From: kurtz le pirate
Subject: isosurface - moving pattern
Date: 1 Jul 2007 04:25:03
Message: <kurtzlepirate-0C47BD.10250001072007@news.povray.org>
hello,

if i use a classic isosurface box perturbed with pigment function like 
this : 

#declare block = isosurface {
  function { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x,y,z).gray*0.75 } 
  ...
  }

with : 
#declare pigmentFn =  function {
  pigment {
    cells
    color_map { [0 rgb 0][1 rgb 1] }
    scale 0.35
    }
  } 

this works well and give me a "perturbed cube". now i want to make and 
other cube with alwaway the same pattern but translated... but how to 
translate the pigment function to have different cube ?


thanks
-- 
klp


Post a reply to this message

From: kurtz le pirate
Subject: Re: isosurface - moving pattern
Date: 1 Jul 2007 04:42:40
Message: <kurtzlepirate-4E7C1C.10424101072007@news.povray.org>
In article <kurtzlepirate-0C47BD.10250001072007@news.povray.org>,
 kurtz le pirate <kur### [at] yahoofr> wrote:

don't care about my previous post :O

adding some things like translate rand(alea) in the pigment function 
work as i want.


:))
-- 
klp


Post a reply to this message

From: Warp
Subject: Re: isosurface - moving pattern
Date: 1 Jul 2007 05:09:02
Message: <46876f2e@news.povray.org>
kurtz le pirate <kur### [at] yahoofr> wrote:
> adding some things like translate rand(alea) in the pigment function 
> work as i want.

  Another possibility, which I think few actually know, is to do something
like this:

#declare IsoFunc =
  function(x, y, z, a, b, c)
  { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x+a,y+b,z+c).gray*0.75 };

isosurface { function { IsoFunc(x, y, z, 1, 2, 3) } }

-- 
                                                          - Warp


Post a reply to this message

From: Samuel Benge
Subject: Re: isosurface - moving pattern
Date: 1 Jul 2007 14:41:38
Message: <4687f562@news.povray.org>
Warp wrote:
>   Another possibility, which I think few actually know, is to do something
> like this:
> 
> #declare IsoFunc =
>   function(x, y, z, a, b, c)
>   { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x+a,y+b,z+c).gray*0.75 };
> 
> isosurface { function { IsoFunc(x, y, z, 1, 2, 3) } }


Thanks Warp. I was one of the many.

~Sam


Post a reply to this message

From: Thomas de Groot
Subject: Re: isosurface - moving pattern
Date: 3 Jul 2007 03:02:05
Message: <4689f46d$1@news.povray.org>
Oh! That's beautiful!
Thanks Warp.

Thomas


Post a reply to this message

From: Marc
Subject: Re: isosurface - moving pattern
Date: 3 Jul 2007 08:15:51
Message: <468a3df7$1@news.povray.org>

46876f2e@news.povray.org...
> kurtz le pirate <kur### [at] yahoofr> wrote:
>> adding some things like translate rand(alea) in the pigment function
>> work as i want.
>
>  Another possibility, which I think few actually know, is to do something
> like this:
>
> #declare IsoFunc =
>  function(x, y, z, a, b, c)
>  { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x+a,y+b,z+c).gray*0.75 };
>
> isosurface { function { IsoFunc(x, y, z, 1, 2, 3) } }
>
> -- 
>                                                          - Warp

Yes and you can as well  scale the function output by multiplying x,y,and z 
(the bigger the multiplier, the smaller the scale)

Marc


Post a reply to this message

From: David Wallace
Subject: Re: isosurface - moving pattern
Date: 4 Jul 2007 18:27:16
Message: <468c1ec4$1@news.povray.org>
Marc wrote:

> 46876f2e@news.povray.org...
>> kurtz le pirate <kur### [at] yahoofr> wrote:
>>> adding some things like translate rand(alea) in the pigment function
>>> work as i want.
>>  Another possibility, which I think few actually know, is to do something
>> like this:
>>
>> #declare IsoFunc =
>>  function(x, y, z, a, b, c)
>>  { max((y*y-1),(x*x-1),(z*z-1)) - pigmentFn(x+a,y+b,z+c).gray*0.75 };
>>
>> isosurface { function { IsoFunc(x, y, z, 1, 2, 3) } }
>>
>> -- 
>>                                                          - Warp
> 
> Yes and you can as well  scale the function output by multiplying x,y,and z 
> (the bigger the multiplier, the smaller the scale)
> 
> Marc 
> 
>
Now for multiple random copies of the object

#declare nSeed = seed(400);
#macro IsoRand(Range,Scale)
   // Range and Scale are 3D vectors
   #local rgX = (random(nSeed)-random(nSeed))*Range.x;
   #local rgY = (random(nSeed)-random(nSeed))*Range.y;
   #local rgZ = (random(nSeed)-random(nSeed))*Range.z;
   isosurface {
     function {
       IsoFunc(x/Scale.x, y/Scale.y, z/Scale.z, rgX, rgY, rgZ)
     }
   }
#end

I've been doing something like this for a project of my own.
-- 
--------------
David Wallace
TenArbor Consulting
"Just In Time Cash"
www.tenarbor.com
1-866-572-CASH


Post a reply to this message

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