Search - User list
Full Version: Day 30 | PATTERNS | Illusion
Root » Nodevember 2020 » Day 30 | PATTERNS | Illusion
rmagee
Everything is just an ILLUSION!
Librarian
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);
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB