This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Graphics.WebGL as GL | |
import Math.Vector3 as GL | |
import Math.Matrix4 as GL | |
type Point = { | |
x : Float, | |
y : Float, | |
z : Float | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import List (..) | |
import Graphics.Collage (..) | |
import Graphics.Element (..) | |
import Color (..) | |
------------------------------------------ | |
-- 2D Point Type | |
type alias Point = { | |
x : Float, | |
y : Float |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------ | |
-- 2D Point Type | |
type Point = { | |
x : Float, | |
y : Float | |
} | |
-- Convert Point to a tuple of floats | |
toTuple : Point -> (Float, Float) | |
toTuple point = (point.x, point.y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------ | |
-- GLOBAL VARIABLES TO PLAY WITH | |
------------------------------------------------ | |
-- number of iterations of the Julia Set | |
maxIterations : Int | |
maxIterations = 100 | |
-- The constant c used in the julia function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MJS (..) | |
import Graphics.WebGL (..) | |
main = webgl (400, 400) scene | |
type Point = {point : V3} | |
toPoint vector = { point = vector } | |
triangle : V3 -> V3 -> V3 -> Triangle Point | |
triangle p1 p2 p3 = (toPoint p1, toPoint p2, toPoint p3) |
NewerOlder