Skip to content

Instantly share code, notes, and snippets.

View TheSeamau5's full-sized avatar

Hassan Hayat TheSeamau5

  • Entrepreneur
  • Austin, TX
View GitHub Profile
@TheSeamau5
TheSeamau5 / RotatingCube.elm
Created December 3, 2014 16:50
Idea for making 3D objects
import Graphics.WebGL as GL
import Math.Vector3 as GL
import Math.Matrix4 as GL
type Point = {
x : Float,
y : Float,
z : Float
}
@TheSeamau5
TheSeamau5 / HexagonalGrid.elm
Last active August 29, 2015 14:10
How to make a simple hexagonal grid in Elm
import List (..)
import Graphics.Collage (..)
import Graphics.Element (..)
import Color (..)
------------------------------------------
-- 2D Point Type
type alias Point = {
x : Float,
y : Float
@TheSeamau5
TheSeamau5 / IsometricBoard.elm
Last active December 29, 2015 21:52
How to make a simple isometric 2D Board in Elm
------------------------------------------------
-- 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)
@TheSeamau5
TheSeamau5 / JuliaSets.elm
Created May 7, 2014 22:13
Julia Sets in Elm
------------------------------------------------
-- GLOBAL VARIABLES TO PLAY WITH
------------------------------------------------
-- number of iterations of the Julia Set
maxIterations : Int
maxIterations = 100
-- The constant c used in the julia function
@TheSeamau5
TheSeamau5 / HelloTriangle.elm
Created May 5, 2014 02:06
Hello Triangle in WebGL in Elm
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)