It all depends on what you’re printing. This is an unfinished visualization of
Diggsey’s Trigonometry Tutorial, I played with a while back. Set the display setting to - Windowed (1024 x 768). Media is attached. The code uses both text and print commands. You can see how using text in place of print, would only add unnecessary code.
REM Project: Trigonometry
REM Created: 9/13/2011 7:41:19 PM
REM
REM ***** Main Source File *****
REM
load image "lgangle.bmp", 1
load image "wangle.bmp", 2
sync on
sync rate 60
a as float = 0
width = screen width()
height = screen height()
do
cls
ink rgb(255, 255, 255)
print "1 - 2D Trigonometry"
ink rgb(0, 128, 0)
print "2D Trigonometry is the branch of mathematics that deals with the relationship between angles and sides of circles and"
print "right-angled triangles. It is very useful in both 2D and 3D games for everything from calculating distances to moving an object"
print "or sprite in a particular direction."
print
ink rgb(255, 255, 255)
print "1.1 - Theory"
ink rgb(0, 128, 0)
print "The theory part of 2D Trigonometry is what each function actually means in relation to a right-angled triangle. Below is a"
print "animated right angled triangle, color coded with names for each part."
print
ink rgb(255, 255, 255)
print "1.1.1 - Sin"
ink rgb(0, 128, 0)
print "This is short for Sine. The function Sin( ) returns the ratio between the opposite and the hypotenuse for angle . This means"
print "that for any right angled triangle, Sin( ) returns the opposite divided by the hypotenuse. The value returned ranges from"
print "-1 to +1. Sin = O/H"
paste image 1, 328, 150: paste image 1, 896, 150: paste image 1, 320, 166
ink rgb(255, 255, 255)
text 600, 548, "Angle: " + str$(a)
ink rgb(0,255, 0)
text 600, 564, "Hypotenuse: 10"
ink rgb(255, 0, 0)
text 600, 580, "Adjacent: " + str$(cos(a) * 10, 10)
ink rgb(0, 0, 255)
text 600, 596, "Opposite: " + str$(sin(a) * 10, 10)
ink rgb(255, 255, 255)
text 600, 612, "Sin( ): " + str$(sin(a), 10)
paste image 2, 632, 612
for i = 0 to 220 step 10
ink rgb(64, 64, 64)
if i = 110
ink rgb(128, 128, 128)
endif
line width - 221, i + height - 221, width - 1, i + height - 221
line i + width - 221, height - 221, i + width - 221, height - 1
next i
ink rgb(255, 255, 255)
circle 913, 657, 100
ink rgb(255, 0, 0)
line 913, 657, 913 + (cos(a) * 100), 657
ink rgb(0, 0, 255)
line 913 + (cos(a) * 100), 657, 913 + (cos(a) * 100), 657 - (sin(a) * 100)
ink rgb(0, 255, 0)
line 913, 657, 913 + (cos(a) * 100), 657 - (sin(a) * 100)
a = wrapvalue(a + 1)
sync
wait 100
loop
end