SHARE
TWEET

Untitled

a guest Apr 19th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int x_cor(float a, float t)
  2. {
  3.     float X = (a * t * t)/(1 + t * t);
  4.     return (int)X;
  5. }
  6.  
  7. int y_cor(float a, float t)
  8. {
  9.     float Y = -(a * t * t * t)/(1 + t * t);
  10.     return (int)Y;
  11. }
  12.  
  13. for (t = -100; t < 100; t += 0.001)
  14.     {
  15.         if (t == -1)
  16.             t++;
  17.         X = x_cor(a, t);
  18.         Y = y_cor(a, t);
  19.         SDL_RenderDrawPoint(renderer, X + null_X, Y + null_Y);
  20.     }
  21. SDL_RenderPresent(renderer);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top