|
Posted by Ken S. Tucker on February 20, 2008, 3:50 pm
Please log in for more thread options
On Feb 17, 3:00 pm, david.willi...@bayman.org (David Williams) wrote:
> -> LOL, we must have some stock software we
> -> could submit, what about that moon cratering
> -> program, that no one can figure out?
> -> Ken
>
> I think I have it right here...
>
> -------------------------------------------------
>
> 5 ' Craters. Ken and Travis Tucker. Approx 1988. dynam...@vianet.ca
> 10 CLEAR : SCREEN 7, 0, 0, 0: KEY OFF: CLS
> 12 PCOPY 0, 1: PCOPY 0, 2: PCOPY 0, 3: VIEW PRINT 1 TO 25
> 21 C = 1: GOSUB 22: C = 9: GOSUB 22: GOTO 25
> 22 FOR A = 1 TO 100: X = RND * 320: Y = RND * 200
> 23 PSET (X, Y), C: NEXT A: RETURN
> 25 DR = 3.141592 / 180: R = 10
> 30 RANDOMIZE TIMER
> 35 DIM X(500), Y(500)
> 40 CIRCLE (160, 100), 90, 8
> 45 PAINT (160, 100), 4, 8: PAINT (160, 100), 8, 8
> 100 R = INT(RND * RND * RND * RND * 20) + 1: LO = RND * 170 - 85
> 105 LA = RND * 140 - 70: C = 8
> 110 X0 = 90 * SIN(DR * LO) * COS(DR * LA) + 160
> 112 Y0 = 76 * SIN(LA * DR) + 100
> 115 GOSUB 300: IF R = 1 THEN PSET (X0, Y0), 14: GOTO 100
> 120 C = 12: GOSUB 130: PAINT (X0, Y0), 4, 12: GOSUB 600:
> 125 PAINT (X0, Y0), 7, 12: GOSUB 400: GOSUB 500: GOTO 180
> 130 N = 0: S = 36 / R: FOR A = 1 TO 360 STEP S: N = N + 1
> 140 U = R * SIN(A * DR) + LO: V = R * COS(A * DR) + LA
> 150 X = 90 * SIN(DR * U) * COS(DR * V) + B: Y = 76 * SIN(V * DR)
> 155 X(N) = X: Y(N) = Y
> 160 PSET (X + 160, Y + 100), C
> 170 NEXT A: RETURN
> 180 PSET (X0, Y0), 15
> 200 GOTO 100
> 300 PCOPY 0, 1: DX = X0 - 160: DY = Y0 - 100
> 305 LINE (DX * 10, DY * 10)-(X0, Y0), 14: GOSUB 600: PCOPY 1, 0
> 310 FOR A = 1 TO R * 4: X1 = X0 + RND * 4 * R - 2 * R
> 315 Y1 = Y0 + 4 * RND * R - 2 * R
> 320 LINE (X0, Y0)-(X1, Y1), 4: NEXT A: GOSUB 600: PCOPY 1, 0: RETURN
> 400 FOR A = 1 TO N: X = X(A): Y = Y(A)
> 410 IF X = 0 OR Y = 0 THEN 420
> 412 PSET (X + 160 + X / ABS(X), Y + 100 + Y / ABS(Y)), 0
> 420 NEXT A: RETURN
> 500 FOR A = 1 TO N: X = X(A): Y = Y(A)
> 510 PSET (X + 160, Y + 100), 14
> 520 NEXT A: RETURN
> 600 FOR DE = 1 TO 5: T = TIMER: WHILE TIMER = T: WEND: NEXT: RETURN
>
> ------------------------------------------------------------
>
> It is pretty. And no, I've never fully figured it out.
> dow
Actually Dave *it's your fault* (just kiding),
but remember you suggested we write our code tight,
well that's what happened.
Among the great historical mystery's, how were
the Pyamids constructed, why is the sky blue,
and finally how the fuck does that Luny program
work.
Thanks Dave for the reminder.
Lately I've been studying meteor impacts on the
Sun and on Jupiter (Shoe-Levi 9), looks like a
smokin' gun...
Best to you!
Ken
|