Skip to content

Commit

Permalink
Merge pull request #20 from Triadica/clifford
Browse files Browse the repository at this point in the history
render clifford attractor
  • Loading branch information
NoEgAm authored May 20, 2024
2 parents 56c4ef4 + 4a78f41 commit 38944d4
Show file tree
Hide file tree
Showing 50 changed files with 1,440 additions and 158 deletions.
124 changes: 116 additions & 8 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 21 additions & 9 deletions compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
def skip-rendering? $ = "\"true" (get-env "\"skip" "\"false")
|tabs $ %{} :CodeEntry (:doc |)
:code $ quote
def tabs $ [] (:: :fireworks |Fireworks :dark) (:: :lorenz |Lorenz :dark) (:: :aizawa |Aizawa :dark) (:: :fourwing "|Four Wing" :dark) (:: :fractal |Fractal :dark) (:: :collision |Collision :dark) (:: :bounce |Bounce :dark) (:: :feday |FEDAY :dark) (:: :bifurcation "\"Bifurcation" :dark) (:: :ball-spin "\"Ball Spin" :dark) (:: :lifegame "\"Lifegame" :dark) (:: :lifegame-trail "\"Lifegame Trail" :dark) (:: :bounce-trail "|Bounce Trail" :dark) (:: :orbit-spark "|Orbit Spark" :dark) (:: :chen |Chen :dark) (:: :sprott |Sprott :dark) (:: :lorenz83 |Lorenz83 :dark) (:: :orbits |Orbits :dark) (:: :lamps |Lamps :dark) (:: :debug-grid "|Debug Grid" :dark) (:: :den-tsucs "\"Den Tsucs" :dark) (:: :bouali "\"Bouali" :dark) (:: :orbits2 "\"Orbits 2" :dark)
def tabs $ [] (:: :fireworks |Fireworks :dark) (:: :lorenz |Lorenz :dark) (:: :aizawa |Aizawa :dark) (:: :fourwing "|Four Wing" :dark) (:: :fractal |Fractal :dark) (:: :collision |Collision :dark) (:: :bounce |Bounce :dark) (:: :feday |FEDAY :dark) (:: :bifurcation "\"Bifurcation" :dark) (:: :ball-spin "\"Ball Spin" :dark) (:: :lifegame "\"Lifegame" :dark) (:: :lifegame-trail "\"Lifegame Trail" :dark) (:: :bounce-trail "|Bounce Trail" :dark) (:: :orbit-spark "|Orbit Spark" :dark) (:: :chen |Chen :dark) (:: :sprott |Sprott :dark) (:: :lorenz83 |Lorenz83 :dark) (:: :orbits |Orbits :dark) (:: :lamps |Lamps :dark) (:: :debug-grid "|Debug Grid" :dark) (:: :den-tsucs "\"Den Tsucs" :dark) (:: :bouali "\"Bouali" :dark) (:: :orbits2 "\"Orbits 2" :dark) (:: :halvorsen "\"Halvorsen" :dark) (:: :clifford "\"Clifford" :dark) (:: :dequanli "\"Dequan Li" :dark) (:: :dadras "\"Dadras" :dark) (:: :burke-shaw "\"Burke Shaw" :dark) (:: :quadratic "\"Quadratic" :dark)
|threshold $ %{} :CodeEntry (:doc |)
:code $ quote
def threshold $ js/parseFloat
Expand Down Expand Up @@ -146,6 +146,12 @@
:debug-grid $ debug-grid/loadRenderer canvas
:den-tsucs $ den-tsucs/loadRenderer canvas
:bouali $ bouali/loadRenderer canvas
:halvorsen $ halvorsen/loadRenderer canvas
:clifford $ clifford/loadRenderer canvas
:dequanli $ dequanli/loadRenderer canvas
:dadras $ dadras/loadRenderer canvas
:burke-shaw $ burke-shaw/loadRenderer canvas
:quadratic $ quadratic/loadRenderer canvas
|reload! $ %{} :CodeEntry (:doc |)
:code $ quote
defn reload! () (hint-fn async)
Expand Down Expand Up @@ -192,13 +198,14 @@
"\"./calcit.build-errors" :default build-errors
"\"bottom-tip" :default hud!
"\"../src/apps/fireworks" :as fireworks
"\"../src/apps/attractor-aizawa" :as aizawa
"\"../src/apps/attractor-lorenz" :as lorenz
"\"../src/apps/attractor-fourwing" :as fourwing
"\"../src/apps/attractor-chen" :as chen
"\"../src/apps/attractor-sprott" :as sprott
"\"../src/apps/attractor-lorenz83" :as lorenz-83
"\"../src/apps/attractor-bouali" :as bouali
"\"../src/apps/attractor/aizawa" :as aizawa
"\"../src/apps/attractor/lorenz" :as lorenz
"\"../src/apps/attractor/fourwing" :as fourwing
"\"../src/apps/attractor/chen" :as chen
"\"../src/apps/attractor/sprott" :as sprott
"\"../src/apps/attractor/lorenz83" :as lorenz-83
"\"../src/apps/attractor/bouali" :as bouali
"\"../src/apps/attractor/halvorsen" :as halvorsen
"\"../src/apps/fractal" :as fractal
"\"../src/apps/collision" :as collision
"\"../src/apps/bounce" :as bounce
Expand All @@ -213,7 +220,12 @@
"\"../src/apps/orbits-2" :as orbits-2
"\"../src/apps/lamps" :as lamps
"\"../src/apps/debug-grid" :as debug-grid
"\"../src/apps/attractor-den-tsucs" :as den-tsucs
"\"../src/apps/attractor/den-tsucs" :as den-tsucs
"\"../src/apps/clifford" :as clifford
"\"../src/apps/attractor/dequanli" :as dequanli
"\"../src/apps/attractor/dadras" :as dadras
"\"../src/apps/attractor/burke-shaw" :as burke-shaw
"\"../src/apps/quadratic" :as quadratic
"\"../src/index" :refer $ setupInitials
"\"../src/config" :as js-config
"\"../src/index" :refer $ listenShaderError
Expand Down
10 changes: 5 additions & 5 deletions src/apps/attractor-aizawa.mts → src/apps/attractor/aizawa.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRenderer } from "../index.mjs";
import attractorCompute from "./attractor-aizawa.wgsl?raw";
import { fiboGridN, rand_middle } from "../math.mjs";
import { createRenderer } from "../../index.mjs";
import attractorCompute from "./aizawa.wgsl?raw";
import { fiboGridN, rand_middle } from "../../math.mjs";

export let loadRenderer = async (canvas: HTMLCanvasElement) => {
let seedSize = 2000000;
Expand All @@ -10,8 +10,8 @@ export let loadRenderer = async (canvas: HTMLCanvasElement) => {
{
seedSize,
seedData: makeSeed(seedSize, 0),
params: [
0.04, // deltaT
getParams: (dt) => [
dt * 0.04, // deltaT
600.0, // scale
0.001, // width
0.99, // opacity
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/apps/attractor-bouali.mts → src/apps/attractor/bouali.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRenderer } from "../index.mjs";
import attractorCompute from "./attractor-bouali.wgsl?raw";
import { fiboGridN, rand_middle } from "../math.mjs";
import { createRenderer } from "../../index.mjs";
import attractorCompute from "./bouali.wgsl?raw";
import { fiboGridN, rand_middle } from "../../math.mjs";

export let loadRenderer = async (canvas: HTMLCanvasElement) => {
let seedSize = 400000;
Expand All @@ -10,8 +10,8 @@ export let loadRenderer = async (canvas: HTMLCanvasElement) => {
{
seedSize,
seedData: makeSeed(seedSize, 0),
params: [
1, // deltaT
getParams: (dt) => [
dt, // deltaT
400.0, // scale
0.008, // width
0.99, // opacity
Expand Down
File renamed without changes.
Loading

0 comments on commit 38944d4

Please sign in to comment.