Julia mit GameZero
This commit is contained in:
@@ -1,8 +1,24 @@
|
|||||||
#using Plots
|
#= using Plots
|
||||||
#plot([1,2,3,4], [1,4,9,16], label="Quadratisch")
|
plot([1,2,3,4], [1,4,9,16], label="Quadratisch") =#
|
||||||
|
|
||||||
using GLMakie
|
#using GLMakie
|
||||||
lines(0:0.01:10, sin)
|
#lines(0:0.01:10, sin)
|
||||||
|
|
||||||
#using Gadfly
|
#using Gadfly
|
||||||
#plot(x=1:10, y=(1:10).^2, Geom.line)
|
#plot(x=1:10, y=(1:10).^2, Geom.line)
|
||||||
|
|
||||||
|
using GameZero
|
||||||
|
using Colors
|
||||||
|
|
||||||
|
# Fenster-Einstellungen
|
||||||
|
WIDTH = 400
|
||||||
|
HEIGHT = 400
|
||||||
|
BACKGROUND = :black
|
||||||
|
|
||||||
|
# Die draw-Funktion wird jeden Frame aufgerufen
|
||||||
|
function draw()
|
||||||
|
# Zeichnet einen einzelnen Punkt (Pixel) bei x=200, y=200
|
||||||
|
# Da ein Pixel winzig ist, nutzt man oft ein kleines Rechteck
|
||||||
|
# oder die Point-Funktion.
|
||||||
|
draw(Rect(200, 200, 1, 1), :red, fill=true)
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user