This file contains 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
(ns happy-place | |
(:require [clojure2d.core :refer :all] | |
[clojure2d.color :as c] | |
[fastmath.random :as r] | |
[fastmath.core :as m] | |
[fastmath.vector :as v])) | |
(def dim 900) | |
(def agents 128) |
This file contains 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
(ns gen-art.beads | |
(:require [clojure2d.core :refer :all] | |
[fastmath.core :as m] | |
[fastmath.random :as r] | |
[fastmath.fields :as f] | |
[fastmath.vector :as v] | |
[clojure2d.color :as c] | |
[clojure2d.extra.utils :as ut] | |
[clojure2d.pixels :as p]) | |
(:import [fastmath.vector Vec2]) ) |
This file contains 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
(ns gen-art.boids | |
(:require [clojure2d.core :refer :all] | |
[fastmath.core :as m] | |
[fastmath.random :as r] | |
[fastmath.fields :as f] | |
[fastmath.vector :as v] | |
[clojure2d.color :as c] | |
[clojure2d.pixels :as p]) | |
(:import [fastmath.vector Vec2])) |
This file contains 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
(ns attractors.dejong | |
(:require [clojure2d.core :refer :all] | |
[clojure2d.pixels :as p] | |
[clojure2d.color :as c] | |
[fastmath.core :as m] | |
[fastmath.vector :as v] | |
[fastmath.random :as r])) | |
;(set! *warn-on-reflection* true) |
This file contains 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
module Main where | |
import Codec.Picture | |
import Control.Monad.ST | |
import Control.Monad.Primitive | |
import qualified Codec.Picture.Types as M | |
import Graphics.Gloss | |
import Graphics.Gloss.Data.ViewPort(ViewPort) | |
import Graphics.Gloss.Juicy (fromImageRGBA8) |
This file contains 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 Html exposing (beginnerProgram, div, span, button, text) | |
import Html.Events exposing (onClick) | |
type Msg | |
= Increment Int | |
| Decrement Int | |
type alias Model = | |
{ action : Int -> Msg |
This file contains 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
/// My function types | |
type Backward<'Core> = 'Core -> 'Core | |
type InputCore = { | |
backward : Backward<InputCore> | |
x : float | |
} | |
type TanhCore = { | |
backward : Backward<TanhCore> |
This file contains 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
type Tree a = | |
Empty | |
| Node a (Tree a) (Tree a) | |
mirror : Tree a -> Tree a | |
mirror t = | |
case t of | |
Empty -> Empty | |
Node v l r -> Node v (mirror r) (mirror l) |
This file contains 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
#I "packages/Rx-Linq/lib/net45" | |
#I "packages/Rx-Interfaces/lib/net45" | |
#I "packages/Rx-Core/lib/net45" | |
#I "packages/FSharp.Control.Reactive/lib/net40" | |
#r "FSharp.Control.Reactive.dll" | |
#r "System.Reactive.Core.dll" | |
#r "System.Reactive.Interfaces.dll" | |
#r "System.Reactive.Linq.dll" |
This file contains 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
open System | |
open System.Windows.Forms | |
open System.Drawing | |
type Action = | |
| Increment | |
| Decrement | |
let form = new Form(Width= 400, Height = 300, Visible = true, Text = "Hello World") |
NewerOlder