 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Jörg "Yadgar" Bleimann
Subject: Cylindrical pattern animation - how to get the circles overlap?
Date: 12 Jun 2026 11:10:33
Message: <6a2c2169@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Hi(gh)!
As a background for an animated text imploring a dear friend to buy a
new laptop, I want to have a white mesh2 screen with slowly growing
black polka dots, which finally overlap until no white is visible
anymore - but instead they just stop growing as they touch each other!
Is there a way to keep them growing anyway? Or do I have to use a
different pigment pattern?
Here is the code:
// begin code:
/* #declare loop=div(clock,200);
#switch(loop)
#case(0) */
#declare OuterColor=<1, 1, 1>;
#declare InnerColor=<0, 0, 0>;
#declare TranslateVector=<-0.005, -0.0035, 0>;
/* #break
#end */
mesh2
{
vertex_vectors
{
4
<-1, 0.5, 1>, <3, 0.5, 1>, <-1, -0.5, -1>, <3, -0.5, 1>
}
face_indices
{
2
<0, 1, 2>, <1, 2, 3>
}
texture
{
pigment
{
cylindrical
rotate <90, 0, 0>
translate <1, 1, 0>
warp { repeat x*2 }
warp { repeat y*2 }
color_map
{
[0 color rgb OuterColor]
[1-clock/105 color rgb OuterColor]
[1-clock/105 color rgb InnerColor]
[1 color rgb InnerColor]
}
}
finish { ambient 1 diffuse 0 }
scale 0.05
translate clock*TranslateVector
}
}
camera
{
orthographic
location <1, 0.15, -5>
look_at <1, 0.15, 0>
right <1000, 0, 0>
up <0, 100, 0>
angle 40
}
See you in Khyberspace!
Yadgar
Now playing: Apo 22 (Vangelis)
--
VBI BENE, IBI BACTRIA!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
=?UTF-8?Q?J=C3=B6rg_=22Yadgar=22_Bleimann?= <yaz### [at] gmx de> wrote:
> Hi(gh)!
>
> As a background for an animated text imploring a dear friend to buy a
> new laptop, I want to have a white mesh2 screen with slowly growing
> black polka dots, which finally overlap until no white is visible
> anymore - but instead they just stop growing as they touch each other!
>
> Is there a way to keep them growing anyway? Or do I have to use a
> different pigment pattern?
>
> Here is the code:
>
> // begin code:
>
> /* #declare loop=div(clock,200);
> #switch(loop)
> #case(0) */
> #declare OuterColor=<1, 1, 1>;
> #declare InnerColor=<0, 0, 0>;
> #declare TranslateVector=<-0.005, -0.0035, 0>;
> /* #break
> #end */
>
>
> mesh2
> {
> vertex_vectors
> {
> 4
> <-1, 0.5, 1>, <3, 0.5, 1>, <-1, -0.5, -1>, <3, -0.5, 1>
> }
> face_indices
> {
> 2
> <0, 1, 2>, <1, 2, 3>
> }
> texture
> {
> pigment
> {
> cylindrical
> rotate <90, 0, 0>
> translate <1, 1, 0>
> warp { repeat x*2 }
> warp { repeat y*2 }
> color_map
> {
> [0 color rgb OuterColor]
> [1-clock/105 color rgb OuterColor]
> [1-clock/105 color rgb InnerColor]
> [1 color rgb InnerColor]
> }
> }
> finish { ambient 1 diffuse 0 }
> scale 0.05
> translate clock*TranslateVector
> }
> }
>
> camera
> {
> orthographic
> location <1, 0.15, -5>
> look_at <1, 0.15, 0>
> right <1000, 0, 0>
> up <0, 100, 0>
> angle 40
> }
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Apo 22 (Vangelis)
> --
> VBI BENE, IBI BACTRIA!
When I first started to answer this. I thought 'scale the the pigment with the
clock'. Then I open the reply page and really looked at your code. I needed to
play with it to see what it's doing. And after many minutes this is what I came
up with
#declare A=1-clock;
plane{z,0 pigment{spherical color_map{[A,rgb 1] [A,rgb 0]}
scale 1+clock*10
translate <1, 1, 0>
warp { repeat x*2 }
warp { repeat y*2 }
} finish{ambient 1}scale .05}
I guess you could just insert the 'scale 1+clock*10' into you code. But where
the fun in that?!:)
Have Fun!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |