# Ardu3d

I received my Kickstarter Arduboy so it was the perfect time to make a new demo :

Source code is available on Github : https://github.com/Initgraph/Ardu3D

Enjoy

7 Likes

Hey, thanks for putting this up. I’ll put it in the games section as there is a playable demo : )

So I noticed you are using a transformation matrice in your program to alter the initial vector coordinates, in this case rotate by sin/cos theta, where theta is the angle of rotation. I’m wondering if you have goofed with the matrix library for Arduino at all, which an be found here.

Very nice program, and a great example. I really am curious, and haven’t had time to play with the matrix library at all, so I’m wondering if anyone has built something with it, or tried it at all.

Here’s the pretty legit algorithm for updating vertex positions from @arduboyfr’s source.

Thanks again @arduboyfr

Hi,

Sorry for this very late response and thank you for your comment.
I learned many years ago matrix used by Direct3D and effectively matrix are the best way to make a 3D engine. That depends that we have to do, a small 3D demo or a 3D engine
Unfortunately, at the moment I only have time to make small demos or small games :-(. But at least I’m sure to make something that I’m able to finish :-).

1 Like

Referring to the line: rotAngle = rotAngle & 255; // Equals to "rotAngle = rotAngle % 256"
If your rotAngle variable is only going from 0 - 255 and then resetting back to zero, can’t you just define that variable as an uint8_t or byte and just count it regularly? Overflow would be lost and the value would go back to zero as soon as it exceeds 255, right?

I have not tried but I think you’re right.
At the beginning, rotAngle was an uint16_t with a modulo of 360 so when I used the uint8_t with a modulo of 256 I kept the original notation.