-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperiment.cpp
64 lines (63 loc) · 1.27 KB
/
experiment.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
void drawShape()
{
// glTranslatef(X,Y,Z);
// litshape();
//
// Ball redBall;
// redBall.draw(0.4,0.4);
//
// glColor3f(0.0, 1, 0.7);
// glBegin(GL_LINE_STRIP);
// drawline(0.1, 0.1, 0.5, 0.5);
// glEnd();
//
// glColor3f(0.0, 0.7, 0.7);
// glBegin(GL_LINE_STRIP);
// drawline(1, 1, 0.85, 0.9);
// //drawline(1, 1, 2, 2);
// glEnd();
//
// glColor3f(0.0, 0.9, 0.7);
// glBegin(GL_LINE_STRIP);
// glVertex2f(1, 0);
// glVertex2f(2, 3);
// glVertex2f(4, 5);
// glEnd();
//
// glColor3f(1.0, 1.0, 0.0); // Color (RGB): Yellow
// glLineWidth(2.0); // Set line width to 2.0
//
// // Draw line
// glBegin(GL_LINES);
// drawline(0.25, 0.5, 0.4, 0.5);
// drawline(0.4, 0.6, 0.4, 0.5);
// drawline(0.4, 0.4, 0.4, 0.5);
// drawline(0.6, 0.5, 0.75, 0.5);
// glEnd();
//
// // Draw triangle
// glBegin(GL_TRIANGLES);
// glVertex2f(0.4, 0.5);
// glVertex2f(0.6, 0.6);
// glVertex2f(0.6, 0.4);
// glEnd();
}
//class Ball
//{
// public:
// int xpos, ypos;
// double velocity;
// void draw(int x, int y){
// Move(x,y);
// glPushMatrix();
// glTranslatef(xpos, ypos,1);
// glColor3d(1, 0, 0);
// glutSolidSphere(0.3, 50, 50);
// glPopMatrix();
// }
// void Move(int x, int y)
// {
// xpos = x;
// ypos = y;
// }
//};