charmhe / MySaturn

See the demo videos!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Saturn

Author@ Charles H

Enjoy the demo video first!

User Interface

THIS PROGRAM WILL COST A LOT OF MEMORY, CAREFULLY DECIDED WHETER TO OPEN IT!!!

Delete main.cpp - main( ) - glutIdleFunc(idle); to stop rotation.

Active main.cpp - main( ) - scalarization/rotation/translation to change camera

Go to data.h to change windows' size.

Compiler

Using cmake -G "$Xcode" to compiler in xcode.

For vs2017, reading this:https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/#build-cmake

For CLion, since CMake is its default way to construct a project, things are the same.

Program structure

data.h -| matrix.h -| | camera.h | draw.h | render.cpp

data.h is the basic config of this program. Including position of eyes, gaze point, and direction of camera.

matrix.h contains common matrix operations.

camera.h includes the construction of camera, and projection functions.

draw.h includes line, pixel and polygon filling algorithm, plus Torus, Sphere, Cone's parametric rendering.

render.cpp is the drawing process.

About

See the demo videos!


Languages

Language:C++ 57.6%Language:C 19.7%Language:Makefile 10.9%Language:CMake 6.9%Language:Objective-C 4.4%Language:Shell 0.4%