Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. int alfa;
  2. int velocity;
  3. Bitmap bitmap;
  4.  
  5. public Form1()
  6. {
  7. InitializeComponent();
  8.  
  9. }
  10.  
  11. private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
  12. {
  13. alfa = hScrollBar1.Value;
  14. label5.Text = Convert.ToString(alfa);
  15. }
  16.  
  17. private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
  18. {
  19. velocity = hScrollBar2.Value;
  20. label6.Text = Convert.ToString(velocity);
  21. }
  22.  
  23. private void button1_Click(object sender, EventArgs e)
  24. {
  25.  
  26. }
  27.  
  28. private void panel1_Paint(object sender, PaintEventArgs e)
  29. {
  30. Point x = new Point(panel1.Width, panel1.Height-1);
  31. Point y = new Point(1, 0);
  32. Point z = new Point(1, panel1.Height-1);
  33.  
  34. Pen blackPen = new Pen(Color.Black, 2);
  35.  
  36. e.Graphics.DrawLine(blackPen, z, y);
  37. e.Graphics.DrawLine(blackPen, z, x);
  38. }
  39.  
  40. private void timer1_Tick(object sender, EventArgs e)
  41. {
  42.  
  43. }
  44.  
  45. private double Position(int x, double alfa, double velocity)
  46. {
  47. double y = 0;
  48.  
  49. y = x * Math.Tan(alfa) - (10/(2*Math.Pow(velocity,2)*Math.Pow(Math.Cos(alfa),2))*Math.Pow(x,2));
  50.  
  51. return y;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement