Hey all!
I recently started a little project just for fun. It started with an uneventful bus ride when I pulled out my calc under the cover of my backpack an decided to make a cube. The program draws a square that is blue. As of now pressing the up or down button rotates the cube bringing a different color. The drawing part actually makes it looke like it is rotating which is kind of cool.
Code and screenies released tomorrow but for now:
My current side detection is very inefficient to find what color the next face will be and is near impossible if I want to add left and right movement. If anyone has any surprisingly obvious or complicated ways please do post a reply
Sounds cool! Have you got any screenies?
Alright screenie:

Sorry but the screenie is kind of glitchy, it works better in real life
Code (Extremely inefficient, please cover your eyes or they may bleed):
Code:
```:DCS "000666666666000000666666666A00000666666666AAB000666666666AAAB000111111111AAAB000111111111AAAB000111111111AAAB000111111111AAAB000111111111AABB000111111111A0000001111111110000BB0BBBBBBBB03B0BB3B03330BBB03BB03B3030BB3B3B333B333B30BB3B3B3B3B3B00333B333B333B33B" ZStandard AxesOff DelVar K 1->U 10->C While 1 ~5->A:5->B If U Then 7->D:~7->E .2->F End If U=0 Then ~7->D:7->E ~.2->F End For(E,E,D,F Line(A,E,B,E,C End getKey->K Repeat K=25 or K=34 getKey->K End If K=25 Then 1->U If C=10 Then 11->C Else If C=11 Then 14->C Else If C=14 Then 15->C Else 10->C End End End End If K=34 Then DelVar U If C=10 Then 15->C Else If C=15 Then 14->C Else If C=14 Then 11->C Else If C=11 Then 10->C End End End End End End```
Hey, looks very nice indeed!
For the huge block of If:Then:Else:If:Then:Else, you can just do something like this:

Code:
```If K=34:DelVar U If C=10:15->C If C=15:14->C If C=14:11->C If C=11:10->C ```

It's faster, more effecient, and smaller.
123outerme wrote:
For the huge block of If:Then:Else:If:Then:Else, you can just do something like this:

Code:
```If K=34:DelVar U If C=10:15->C If C=15:14->C If C=14:11->C If C=11:10->C ```

It's faster, more effecient, and smaller.

Code:
```If K=34:DelVar U15(C=10)+14(C=15)+11(C=14)+10(C=11->C ```

It's faster, more effecient, and smaller.

Hold on; think I can get it smaller than that...
Wow thanks guys! Thats helpful. I also would like to include turning left and right so any ideas on that?
You know, I probably would have used a matrix for this...
.-. Matrix's are beyond my head. :-/ Maybe you could explain
Perhaps he is talking about implementing some actual 3D maths?

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum