Skip to content

monsterlady/Cube3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cube Rotation 👋

Version Documentation License: MIT

Implements Cube Rotation, lighting and back culling without using any frame but MVP matrix

What is this Project?

It is a simple implementation of Cube rotation Windows Form APP using MVP matrix in .NET Core (C#). Due to the time, the coding structure is not beautiful and needs to be strengthened later. As an assignment, it shows my understanding of how matrix works in games.

This project is fully based on Math class slides, two great Blog Articles and one video from Youtube.

1- Unity : From noob to expert Ch.1 3D Math

Link: https://www.bookstack.cn/read/shenjun-unity/98.md

2- 3D shapes - knowledge about matrix

Link:https://www.jianshu.com/p/ab71816f7d82

3- Coding Challenge #112: 3D Rendering with Rotation and Projection

Link:https://www.youtube.com/watch?v=p4Iz0XJY-Qk

Notes:

🔅 1- Rotate Angle:

The rotate angle is hardcoded at Timer1_Tick method in MyFrom.cs, it rotate around all axis(default settings).

private void Timer1_Tick(object sender, EventArgs e)
        {
            //Angle per sec
            a += 1;
            double angle = a / 360.0 * Math.PI;
            ...
        }   

🔅 2- How to Operate:

💡 You could choose the rotate axis by clicking the axis buttons below, for example:

Rotate around All axis:
none button chosen

Rotate around X axis:
choose Y and Z button

Rotate around Y axis:
choose X and Z button

Rotate around Z axis:
choose X and Y button

💡 Drag the slider bar on the top could scale the cube

I hope those could be useful !.

Ruikang Xu

avatar

Comments

All comments are described above each relevant code blocks

Environments

IDE: IntellJ Rider
Development Enviroment: .NET Core V3.1.402
Software operating environment: Windowns 10 64 bits

Author

👤 Ruikang Xu

📝 License

Copyright © 2020 Ruikang Xu.

About

MVP matrix Cube rotation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages