Skip to content

Instantly share code, notes, and snippets.

Created November 29, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ea0ff605023cf9d00bc9 to your computer and use it in GitHub Desktop.
Save anonymous/ea0ff605023cf9d00bc9 to your computer and use it in GitHub Desktop.
# 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