newcmd001 on DeviantArthttps://www.deviantart.com/newcmd001/art/Star-Trek-Clock-155453483newcmd001

Deviation Actions

newcmd001's avatar

Star Trek Clock

By
Published:
846 Views

Description

Note that the actual assignment is an executable program (.exe). Since this is not allowed in DeviantArt for obvious reason, I am posting the screenshots instead.

(And I don't know which category this goes in, so I put it in "Miscellaneous".)

This is what I did for my second Computer Graphics assignment. ;)

Basically, in this assignment, using C++ and OpenGL, I have to create a 2D animation of a solar system (does not have to be the solar system we are in), complete with planets, moons, and orbiting, with an extra mode called the "time mode", where the entire program becomes an analog clock, and three of the planets act as the arms for the clock.

For my program, I decided to do our solar system. =) The eight planets are all there, and if you can't recognize them by the colours, at least you will be able to by their order in orbit and relative size. I didn't put in all the 62 moons of Saturn, obviously, because of space constraint, and the relative distance from the sun and relative size of each other are of course not accurate, otherwise all you will be able to see is the sun, and Jupiter and Saturn seen as a 1x1 pixel dot. =P

So after finishing the solar system, I thought I'd do something extra, and I got this really fun idea (thank You Jesus!) to put a starship inside the program! It started out as a decision between space shuttle and a Star Trek starship, but I decided to do Sovereign-class starship (also known as the USS Enterprise-E) because it's my favourite class of starship!

The evening that I got the idea, I spent 6 hours straight working on the starship. What looked to be an early evening turned into a late night. But I really had fun coding the Sovereign-class, and seeing it rise, from the saucer to the engineering section, the pylons, and the nacelle.

The program looks primitive (oh c'mon, you people who are used to me submitting 3D stuffs!) but the thing is, this piece is done entirely by coding. The assignment was done using only C++ on GLUT. And hours of coding that produced almost 1,000 lines of code.

For information about:
C++ - [link]
OpenGL - [link]
GLUT - [link]

That's another cool thing about it. ;) No 3DS Max involved. No drawing, no clicking, no pointing. All codes.

I probably put in more details than the examiner will care, but doesn't matter; I was no longer doing it for marks, it's really for the love. Hehe. ^_^

So basically in this program, you can:
* accelerate the starship forward or backward
* steer the starship around in the 2D plane
* zoom in and zoom out the window
* rotate the window (clockwise/anti-clockwise)
* move the window around (left/right/up/down)
* toggle into or out of time mode

Plus, when you fly the starship near the sun, because of the heat, the deflector shield goes up to protect the ship from the heat. Nifty! ;)

In the time mode, the earth acts as the hour arm, the Saturn as the minute arm, and the Uranus as the second arm. Also, a fleet of twelve Sovereign-class starships appear to help you find the angle of each o'clock.

I might not have the skills to model a 3D Sovereign-class starship, or even a 2D one, but drawing one using entirely C++ code is not bad. ;) Plus, always wanted to do a simulation to fly her around. So. =)
Image size
600x2550px 281.31 KB
© 2010 - 2024 newcmd001
Comments2
Join the community to add your comment. Already a deviant? Log In
Naeon23's avatar
Woah... The Time Mode looks really cool! I think you'll do well for the assignment, haha. :)