Interesting effect
Author |
Message |
Paul
|
Posted: Mon Dec 13, 2004 11:29 am Post subject: Interesting effect |
|
|
From my projectile motion code
code: |
setscreen ("graphics: max;max")
const grav:= 9.8
var speed, angle, Vhor, Vvert: real
var x, y: real
for b: 0..90 by 10
for c: 0..500 by 5
speed:=c
angle:=b
Vhor:= speed * (cosd (angle))
Vvert:= speed*(sind(angle))
for a : 1 .. 1000000
x := a / 100 * Vhor
y := (Vvert * (a / 100) - 0.5 * grav * (a / 100) ** 2)
drawdot (round (x ), round (y), black)
exit when y <= 0
end for
end for
end for
|
edit: later
code: |
setscreen ("graphics: max;max")
const grav:= 9.8
var speed, angle, Vhor, Vvert: real
var x, y: real
for b: 0..90 by 10
for c: 0..500 by 5
speed:=c
angle:=b
Vhor:= speed * (cosd (angle))
Vvert:= speed*(sind(angle))
for a : 1 .. 1000000
x := a / 100 * Vhor
y := (Vvert * (a / 100) - 0.5 * grav * (a / 100) ** 2)
drawdot (round (x ), round (y), black)
drawdot (round(maxx-x), round(y),black)
exit when y <= 0
end for
end for
end for
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
zomg
|
Posted: Mon Dec 13, 2004 11:38 am Post subject: (No subject) |
|
|
interesting effect indeed
looks kewl when the screen is full
nice job |
|
|
|
|
|
cool dude
|
Posted: Mon Dec 13, 2004 5:59 pm Post subject: (No subject) |
|
|
pretty cool! even though i remember seeing something similar like that on this site before not accusing u of anything though. u should take out that delay, and make it fullscreen because it looks awsome that way. |
|
|
|
|
|
Paul
|
Posted: Mon Dec 13, 2004 6:09 pm Post subject: (No subject) |
|
|
check it.
code: |
setscreen ("graphics: max;max")
drawfill (10,10,black,black)
const grav:= 9.8
var col: int
var speed, angle, Vhor, Vvert: real
var x, y: real
for b: 0..90 by 10
randint (col, 100, 150)
for c: 0..500 by 5
speed:=c
angle:=b
Vhor:= speed * (cosd (angle))
Vvert:= speed*(sind(angle))
for a : 1 .. 1000000
x := a / 100 * Vhor
y := (Vvert * (a / 100) - 0.5 * grav * (a / 100) ** 2)
drawdot (round (x ), round (y), col)
drawdot (round(maxx-x), round(y),col)
exit when y <= 0
end for
end for
end for
|
|
|
|
|
|
|
Kelsey
|
Posted: Mon Dec 13, 2004 9:46 pm Post subject: (No subject) |
|
|
Very cool |
|
|
|
|
|
BPhelmet
|
Posted: Wed Dec 15, 2004 9:36 pm Post subject: (No subject) |
|
|
interesting indeed
nice |
|
|
|
|
|
m&m
|
Posted: Thu Dec 16, 2004 11:38 am Post subject: (No subject) |
|
|
kinda slow but it looks kewl |
|
|
|
|
|
Delos
|
Posted: Thu Dec 16, 2004 5:39 pm Post subject: (No subject) |
|
|
Slow?
Try this:
code: |
setscreen ("graphics:max;max;offscreenonly")
colourback (7)
drawfill (10, 10, black, black)
const grav := 9.8
var col : int
var speed, angle, Vhor, Vvert : real
var x, y : real
for b : 0 .. 90 by 10
randint (col, 100, 150)
for c : 0 .. 500 by 5
speed := c
angle := b
Vhor := speed * (cosd (angle))
Vvert := speed * (sind (angle))
for a : 1 .. 1000000
x := a / 100 * Vhor
y := (Vvert * (a / 100) - 0.5 * grav * (a / 100) ** 2)
drawfilloval (round (x), round (y), 3, 3, col)
drawfilloval (round (maxx - x), round (y), 3, 3, col)
exit when y <= 0
end for
View.Update
cls
end for
end for
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Paul
|
Posted: Thu Dec 16, 2004 7:37 pm Post subject: (No subject) |
|
|
Whoa, slow down there speed demon. |
|
|
|
|
|
|
|