Day 30 | PATTERNS | Illusion

   6304   1   0
User Avatar
スタッフ
1185 posts
Joined: 7月 2005
Offline
Everything is just an ILLUSION!
Robert Magee
Senior Product Marketing Manager
SideFX
User Avatar
Member
142 posts
Joined: 8月 2009
Offline
Eye of the Beholder
float ex(float r; float theta)
{
    return cos(theta) * r; 
}
float ey(float r; float theta)
{
    return sin(theta) * r; 
}

// Z = x + yi;
// Z*Z = (x^2 - y^2) + (2xy)*i;

float real = @P.x* @P.x - @P.y*@P.y;
float img  = 2 * @P.x * @P.y;
float r = sqrt(real * real + img*img);
float theta = atan2(img,real);

@P.x = ex(r , theta);
@P.y = ey(r , theta);
Edited by Librarian - 2020年11月30日 06:29:13

Attachments:
ill2.jpg (146.6 KB)
nod.jpg (64.2 KB)
ill2f.jpg (140.8 KB)
ggft0000.jpg (290.1 KB)
gffgft0000.jpg (151.0 KB)

  • Quick Links