Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x_cor(float a, float t)
- {
- float X = (a * t * t)/(1 + t * t);
- return (int)X;
- }
- int y_cor(float a, float t)
- {
- float Y = -(a * t * t * t)/(1 + t * t);
- return (int)Y;
- }
- for (t = -100; t < 100; t += 0.001)
- {
- if (t == -1)
- t++;
- X = x_cor(a, t);
- Y = y_cor(a, t);
- SDL_RenderDrawPoint(renderer, X + null_X, Y + null_Y);
- }
- SDL_RenderPresent(renderer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement