OpenGL painting Crane Table of Contents
- 1. Basic Ideas
- 1.1 Front
- 1.2 Car Body
- 1.3 boom
- 2 program diagram
- 3. Operation
- 4. Runtime Environment
1 Basic Ideas
In this job, we need to implement a crane Simulation Software Based on OpenGL. Through analysis, we need to divide a large task into a small part. Therefore, the crane should be divided into several modules, and finally these modules can be assembled together. It can be divided into three parts: Head, body, and arms)
1.1 Front
The front can be divided into six sides: front and back, left and right, and top and bottom.
You can use a rectangle to draw the image above and below.
Draw the glass, lamp, and other parts. The glass is implemented using the bezr surface, and the lamp can be implemented using a disc.
The left and right sides can be drawn using multiple rectangles. (Glass needs to be drawn)
1.2 Body
The body consists of a site, 2 axles, and 4 wheels.
The website is drawn with a cube.
Two axles are implemented using two cylinders.
Four wheels can be achieved by adding a ring and a disc. To achieve this, you only need to implement one, and others can be achieved by rotating and translating.
1.3 Boom
The lifting arm includes two brackets, a long arm, and a rope on the long arm. There is a hook on the rope and an object on the hook.
Two brackets can be achieved through two cubes.
You can also use one cube to implement a long arm. But pay attention to the rotation, increase and decrease issues.
The rope, Hook, and object can be implemented as a whole, and finally translated to the end of the long arm.
A rope can be used as a very fine cylindrical string. The increase or decrease of the rope can be achieved by zooming the cylinder.
2 Program Block Diagram 2.1 Class Diagram
3 Operation
• X: rotate around the X axis; X: reverse rotate around the X axis
• Y: rotate around the X axis; Y: reverse rotate around the X axis
• Z: rotate around the X axis; Z: reverse rotate around the X axis
• S: Overall amplification; s: overall reduction
• Lifting key: Lifting Arm rising
• Down key: Boom descent
• 1: Rope rising
• 2: dropped rope
• 3: Lifting Arm Rotation
• 4: Reverse Rotation of the boom
• Left button: Move the car forward
• Right-click: The car returns
• F: Enter full screen
• F: exit full screen
• ESC key: exit the program
4 Running Environment
• OpenGL: 2.1
• Visual maxcompute 2010
• OS: Windows 7 64bit
• Memory: 2G
5 results
Author: Smile
Date: 21:40:30
HTML generated by org-mode 6.35i in Emacs 24