programming in language BASIC (qb45) of a galaxy
SCREEN 12
LOCATE 1, 1: PRINT "touche y = eclaire la galaxie"
LOCATE 2, 1: PRINT "touche z = change la couleur de la galaxie"
LOCATE 3, 1: PRINT "touche i = change le type de galaxie"
LOCATE 4, 1: PRINT "touche b = deplace la galaxie vers le bas"
LOCATE 5, 1: PRINT "touche h = deplace la galaxie vers le haut"
LOCATE 6, 1: PRINT "touche d = deplace la galaxie vers la droite"
LOCATE 7, 1: PRINT "touche g = deplace la galaxie vers la gauche"
LOCATE 8, 1: PRINT "touche w = deformation negative de la galaxie"
LOCATE 9, 1: PRINT "touche x = deformation positive de la galaxie"
LOCATE 10, 1: PRINT "touche + = acceleration de la vitesse de la galaxie"
LOCATE 11, 1: PRINT "touche - = desacceleration de la vitesse de la galaxie"
LOCATE 12, 1: PRINT "touche echap = fin du programe"
LOCATE 13, 1: PRINT "touche fleche du haut= rotation asynchrone de la galaxie"
LOCATE 14, 1: PRINT "touche fleche du bas= rotation synchrone de la galaxie"
LOCATE 15, 1: PRINT "touche fleche de droite = eclairage normal"
LOCATE 16, 1: PRINT "touche fleche de gauche = eclairage intense"
LOCATE 17, 1: PRINT "touche s = 1 ere methode agrandissement de la galaxie"
LOCATE 18, 1: PRINT "touche t = 2 eme methode agrandissement de la galaxie"
LOCATE 19, 1: PRINT "touche u = 1 ere methode retricissement de la galaxie"
LOCATE 20, 1: PRINT "touche v = 2 eme methode retrecissement de la galaxie"
LOCATE 22, 15: INPUT "choix="; choix
CLS
SCREEN 12
CONST up = 72, down = 80, left = 75, right = 77, droite = 100, gauche = 103, bas = 98, haut = 104
CONST plus = 43, moins = 45, defmoins = 119, defplus = 120, coul = 121, lamp = 122
CONST echap = 27, ux = 118, uy = 117, vx = 116, vy = 115

null$ = CHR$(0)
z = .01
g = .999
DO
r = r + z
key$ = CHR$(105)
WHILE INKEY$ = key$
choix = choix + .1
WEND
SELECT CASE keyval$
CASE null$ + CHR$(72)
y = y - 1
CASE null$ + CHR$(80)
y = y + 1
CASE null$ + CHR$(left)
nbr = nbr - 1
CASE null$ + CHR$(right)
nbr = nbr + 1
CASE CHR$(haut)
n = n - 1
CASE CHR$(bas)
n = n + 1
CASE CHR$(gauche)
m = m - 2
CASE CHR$(droite)
m = m + 2
CASE CHR$(plus)
z = z + .005
CASE CHR$(moins)
z = z - .005
CASE CHR$(defplus)
g = g + .0001
CASE CHR$(defmoins)
g = g - .0001
CASE CHR$(ux)
u = u + 1
CASE CHR$(uy)
v = v + 1
CASE CHR$(vx)
u = u - 1
CASE CHR$(vy)
v = v - 1
CASE CHR$(echap)
END
END SELECT
keyval$ = INKEY$
x = -1
FOR a = 2500 TO 1 STEP -15
b = a * (choix / 360)
c = a * (35 / 360)
d = a * (37 / 360)
xm1 = INT(RND * 2)
xm2 = INT(RND * 5)
xm3 = INT(RND * nbr)
im = INT(RND * 5)
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + xm1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + xm2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + xm3 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im + n), diametre, 15
NEXT
FOR a = 400 TO 1 STEP -5
b = a * (choix / 360)
c = a * (35 / 360)
d = a * (37 / 360)
im1 = INT(RND * 15)
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im1 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 175 + im1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 195) + im1 + n), diametre, 11
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im1 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 175 + im1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 195) + im1 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 175 + im1 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 195) + im1 + n), diametre, 11
im2 = INT(RND * 5)
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 175 + im2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 195) + im2 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im2 + n), diametre, 11
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im2 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 180 + im2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 200) + im2 + n), diametre, 15
CIRCLE ((COS((b * g + r * x) + 1 * (y / 10)) * (a / (u + 25)) + 175 + im2 + m), (SIN(b * .999 + r * x) * (a / (v + 57)) + 195) + im2 + n), diametre, 15
NEXT
CLS 1
LOOP
 
programming in language BASIC (qb45) of a galaxy
6
98
0
Published:

programming in language BASIC (qb45) of a galaxy

programmation en language basic (qb45) d'une galaxie en rotation libre
6
98
0
Published:

Creative Fields