I'm trying to make a isometric box grapher for the calculator (I know its been done, probably going to incorporate into something I do later) but here is the code so far:


Code:
prgmOUTLINE

{7,7 -> [A]
Fill(1,[A]
ClrDraw
1 -> C
0 -> D
D -> E
While 1
47C -> Xmax
-Xmax -> Xmin
31C -> Ymax
-Ymax -> Ymin
For(A,-70,0,10
Line(A,(-4A/7)-40,A+70,(-4(A+70)/7+40
Line(A,(4A/7)+40,A+70,(4(A+70)/7-40
End
prgmHOUSE
getKey -> K
While not(k
getkey -> K
End
If K=85
2C -> C
If K=95
.5C -> C
If C>=3
2 -> C
If C<=.24
.25 ->C
End
End
End


Code:
prgmHOUSE

For(A,1,7
For(B,1,7
If [A](A,B
Then
;These next two lines are my problem source... What I am trying to do is using the IF statement above check to see if 1 is the value of the cell. With that, I want to use A and B to get G and H so that when I set it up, the matrix basically turns 45 degrees about the point (0,0) on the graph screen.
10A-10B -> G
12B-6A -> H   
Line(G,H-5,G-4,H-3
Line(G-4, H-3, G-4, H+1
Line(G,H-1, G-4, H+1
Line(G,H-1, G,H-5
Line(G,H-1, G+4, H+1
Line(G+4,H+1,G+4,H-3
Line(G+4,H-3,G,H-5
Line(G,H+3,G-4,H+1
Line(G,H+3,G+4,H+1
End
End
End


So that is what I have so far. Like i said in the program I want to be able to turn the thing 45 degrees basically, but so that at the cell (1,1), the center of that cell on the graph is (0,36) and cell (1,7)'s center is at (60,0)

Any help?
Man, this would be so much easier if I knew exactly what you wanted to do.

I can optimize, though. Want me to?

io io io io i oo j jd dkws fkws kesrfn
Looks to me like he wants to render an isometric 3D cube to the screen in wireframe.
I made one of these once, well, an isometric drawing program (with scrolling)
Xphoenix wrote:
Man, this would be so much easier if I knew exactly what you wanted to do.

I can optimize, though. Want me to?

io io io io i oo j jd dkws fkws kesrfn


Nah, optimization will take place when I actually have the chance to sit down and make the code perfect. And Whtthfxup with the random letters?

KermMartian wrote:
Looks to me like he wants to render an isometric 3D cube to the screen in wireframe.


What I mean to do is sorta what you are doing right now for Civilization Simulator II, but like I said, the code is messing me up in the department of setting each specific box. For example, I want a box at the "top" square (the one at teh north-most point on the screen) when a 1 is in matrix [A]'s (1,1) cell and I also need it to display the sprite at the right-most box when the 1 in [A] is at cell (1,7)... Repeat for the other corners. THe problem is, I want to/ need to use both the cell row and column values to get the X and Y coordinates of teh placement of the sprite.

Any help?
Err, the random letters... I remember there was some point... Maybe to test what color should be used for spoilers???


[EDIT]
OH YEAH! I REMEMBER! It was to see how the word count worked... What was counted as a word, whether my word count would go up because of that, etc...
  
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.

» Go to Registration page
Page 1 of 1
» 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

 

Advertisement