• Advertisement
Sign in to follow this  

QBasic Iso program

This topic is 4006 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made a Qbasic program for making simple cubes in isometric (or at least in ortho, but it looks like iso). Here it is: 0 : CLS PRINT " Box Draw " PRINT "************************" PRINT " Please enter length: " INPUT L# PRINT " Please enter width: " INPUT W# PRINT " Please enter depth: " INPUT D# PRINT " Clear or not? (1/0) " INPUT C# CLS PRINT " Loading... " SLEEP 1 V# = L# * W# * D# D# = D# * .6 SCREEN 7 P# = 100 - (L# / 2) PSET (P#, P#) PSET (P# - L#, P#) PSET (P# - L#, P# - W#) PSET (P#, P# - W#) A# = L# * .5 B# = INT(SQR((D# * D#) - (A# * A#))) PSET (P# - L# - A#, P# - B#) PSET (P# - L# - A#, P# - W# - B#) PSET (P# - A#, P# - W# - B#) LINE (P#, P#)-(P#, P# - W#) LINE (P#, P#)-(P# - L#, P#) LINE (P# - L#, P#)-(P# - L#, P# - W#) LINE (P#, P# - W#)-(P# - L#, P# - W#) LINE (P# - L#, P#)-(P# - L# - A#, P# - B#) LINE (P#, P# - W#)-(P# - A#, P# - W# - B#) LINE (P# - L#, P# - W#)-(P# - L# - A#, P# - W# - B#) LINE (P# - L# - A#, P# - B#)-(P# - L# - A#, P# - W# - B#) LINE (P# - A#, P# - W# - B#)-(P# - L# - A#, P# - W# - B#) IF C# = 1 THEN GOTO 2 ELSEIF C# = 0 THEN GOTO 1 ELSE GOTO 0 END IF 1 : PSET (P# - A#, P# - B#) LINE (P#, P#)-(P# - A#, P# - B#) LINE (P# - A#, P# - B#)-(P# - L# - A#, P# - B#) LINE (P# - A#, P# - B#)-(P# - A#, P# - W# - B#) 2 : PRINT "Volume:"; V# END Try it! EDIT: Whoops, there's a bug. Sorry...

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement