Made trajectory points bigger
This commit is contained in:
parent
7fdb5faeaf
commit
06f6e8221f
@ -19,6 +19,14 @@ when isMainModule:
|
||||
let colour = colour(1, 0, 0)
|
||||
while projectile.position.x >= 0 and projectile.position.x < 800 and projectile.position.y >= 0 and projectile.position.y < 600:
|
||||
world.writePixel(projectile.position.x, 600 - projectile.position.y, colour)
|
||||
if(projectile.position.x + 1 < 800):
|
||||
world.writePixel(projectile.position.x + 1, 600 - projectile.position.y, colour)
|
||||
if(projectile.position.x - 1 >= 0):
|
||||
world.writePixel(projectile.position.x - 1, 600 - projectile.position.y, colour)
|
||||
if(600 - projectile.position.y - 1 >= 0):
|
||||
world.writePixel(projectile.position.x, 600 - projectile.position.y - 1, colour)
|
||||
if(600 - projectile.position.y + 1 < 600):
|
||||
world.writePixel(projectile.position.x, 600 - projectile.position.y + 1, colour)
|
||||
projectile = projectile.tick(environment)
|
||||
writeFile("output.ppm", world.toPPM())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user