Added 87_3-D_Plot in MiniScript

This commit is contained in:
JoeStrout
2023-01-28 17:27:00 -07:00
parent 60a6b290f4
commit 8cea6c1466
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// 3dPlot
//
// Converted from BASIC to MiniScript by Joe Strout
print " "*32 + "3D PLOT"
print " "*15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
print; print; print
e = 2.71828
fna = function(z)
return 30 * e^(-z*z/100)
end function
for x in range(-30, 30, 1.5)
lastZ = 0
y1 = 5 * floor(sqrt(900-x*x)/5)
for y in range(y1, -y1, -5)
z = floor(25+fna(sqrt(x*x+y*y))-.7*y)
if z > lastZ then
print " "*(z-lastZ) + "*", ""
lastZ = z
end if
end for
print
wait 0.1 // (optional)
end for

View File

@@ -0,0 +1,3 @@
Original source downloaded from [Vintage Basic](http://www.vintage-basic.net/games.html).
Conversion to [MiniScript](https://miniscript.org).