Created
November 29, 2015 15:49
-
-
Save anonymous/ea0ff605023cf9d00bc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# define NUM 5000 | |
void Main() | |
{ | |
float radius,theta, x, y; | |
Window::Width() > Window::Height() ? radius = Window::Height() / 2 : radius = Window::Width() / 2; | |
while (System::Update()) | |
{ | |
for (theta = 0.0; theta < TwoPiF; theta += TwoPiF / NUM){ | |
x = radius * Pow(Cos(theta), 3); | |
y = radius * Pow(Sin(theta), 3); | |
Point(x + Window::Width() / 2, y + Window::Height() / 2).draw(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment