Notebook - Welcome to Notebook

Contact/Report Bugs
You can contact me at: bkenwright@xbdev.net












Fractal Fun Take a basic shape circle then them mix in random deformations surface displacements creates an interesting patterns shapes Candy for the eyes The concept isn t overly complex however the result is very interesting in fact it sort of spoils the magic once you ve seen how it s generated See details example of the fractal concept here LINK https notebook xbdev net index php page fractals2 Future ideas projects Explore other shapes e g maybe try splines that represent letters or pictures of objects UI control magic number parameters e g people can play around with all the numbers create all sorts of results Nested shells shapes within small shapes transparent drawing internal aspects Instead of solid surface only draw parts use lines instead Use a textured image for the stretched colors lookup from texture Add environmental mapping lookup for shinny reflection Try different mathematical models quaternions Resolution very high resolution zoom in and show only a small portion of the surface changing Noise algorithm to the color Perlin Try different noise functions mix in other trignometric functions Advanced projects Ask users to rate the different generated images store associated algorithm parameters feed them into a machine learning algorithm which generates patterns that it thinks people like Random parameter changing to generate mixture of shapes colors map the generated texture onto 3d models The principle works by creating points for the surfaces of the circle e g use sin cos to go around and build the points Then link them together link list so you know which point should be connected to which other point After that you should be able to move any of the points and you ll still get your shape but it ll no longer be a circle style body background color ffffff color 333333 style canvas id displayCanvas width 500px height 500px canvas script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init Try out different deviations types of noise correlating factors numCircles 1 maxMaxRad 200 minMaxRad 200 You draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 1 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate context setTransform 1 0 0 1 0 0 background you are drawing it for the sake of exported png images otherwise background will be transparent context fillStyle bgColor context fillRect 0 0 displayWidth displayHeight setCircles onDraw function setCircles var i var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR var newCircle centerX displayWidth 2 centerY displayHeight 2 maxRad maxR minRad minR color 000000 can set a gradient or solid color here fillColor dddddd phase Math random TWO_PI the phase to use for a single fractal curve circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onDraw clear screen context clearRect 0 0 displayWidth displayHeight draw fractal circles for let i 0 i numCircles i let c circles i c pointList1 setLinePoints iterations context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath let point1 c pointList1 let theta c phase let rad c minRad point1 y c maxRad c minRad Drawing the shape involves stepping through a linked list of points let x0 c centerX rad Math cos theta let y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next theta TWO_PI point1 x c phase rad c minRad point1 y c maxRad c minRad x0 c centerX rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context fill context stroke This is the magic Defines a noisy but not wildly varying data set which you will use to draw the curves function setLinePoints iterations const pointList x 0 y 1 pointList next x 1 y 1 var minY 1 var maxY 1 for var i 0 i iterations i let point pointList while point next null let nextPoint point next let dx point x nextPoint x let dy point y nextPoint y let newX point x 0 5 dx dy Math random 2 1 0 2 let newY point y 0 5 dy dx Math random 2 1 Try Circle let newX point x 0 5 dx let newY point y 0 5 dy Mix in other trig random functions sin cos var newPoint x newX y newY minY Math min newY minY maxY Math max newY maxY add linklist between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 let yRange maxY minY if Math abs yRange 0 001 minY 0 yRange 1 0 var normalizeRate 1 yRange point pointList while point null point y normalizeRate point y minY point point next return pointList console log ready script Interpolate style body background color ffffff color 333333 style canvas id displayCanvas width 500px height 500px canvas script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 1 maxMaxRad 200 minMaxRad 200 You draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 1 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate context setTransform 1 0 0 1 0 0 background you are drawing it for the sake of exported png images otherwise background will be transparent context fillStyle bgColor context fillRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR var newCircle centerX displayWidth 2 centerY displayHeight 2 maxRad maxR minRad minR color 000000 can set a gradient or solid color here fillColor CCCCCC param 0 changeSpeed 1 100 phase Math random TWO_PI the phase to use for a single fractal curve circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var yOffset clear screen context clearRect 0 0 displayWidth displayHeight draw circles for j 0 j drawsPerFrame j for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 c centerX rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 c centerX rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context fill context stroke Here is the function that defines a noisy but not wildly varying data set which you will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next let dx point x nextPoint x let dy point y nextPoint y let newX point x 0 5 dx dy Math random 2 1 let newY point y 0 5 dy dx Math random 2 1 Try experimenting with these 2 lines e g let newX point x 0 5 dx dy Math random 2 1 let newY point y 0 5 dy dx Math random 2 1 Math sin iterations 0 01 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList console log ready script Moving the pattern around but not clearing the screen style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 1 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderely sized canvas iterations 8 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor 000000 urlColor 444444 lineWidth 3 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 60 function setCircles var i var r g b a var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR var newCircle centerX maxR centerY displayHeight 2 20 maxRad maxR minRad minR color rgba 0 220 255 1 can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 200 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase Math random TWO_PI the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 1 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param slowly rotate c phase 0 002 move center c centerX 0 4 c centerY 0 015 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null You are drawing in new position by applying a transform This so gradients will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius You will draw the curve twice first colored then low alpha black on top with an offset context strokeStyle c color context lineWidth lineWidth context beginPath point1 c pointList1 first point2 c pointList2 first theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta 1 y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta 1 y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke now draw second time in low alpha black context strokeStyle rgba 0 0 0 0 22 context lineWidth lineWidth context beginPath point1 c pointList1 first point2 c pointList2 first theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke Here is the function that defines a noisy but not wildly varying data set which you ll use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 You ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Making things a bit more funky gradient color style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 1 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 8 n umber of curves to draw on every tick of the timer drawsPerFrame 4 bgColor 000000 urlColor 444444 lineWidth 1 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 60 function setCircles var i var r g b a var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR define gradient grad context createLinearGradient 0 85 maxR 0 0 7 maxR 0 grad addColorStop 1 rgba 255 0 0 0 2 grad addColorStop 0 rgba 20 220 0 0 4 var newCircle centerX maxR centerY displayHeight 2 50 maxRad maxR minRad minR color grad can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 250 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase Math random TWO_PI the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 75 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 5 c centerY 0 04 yOffset 40 Math sin c globalPhase drawCount 1000 6 28 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null w you are drawing in new position by applying a transform Wyouare doing this so the gradient will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY yOffset Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which you ll use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 You ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Why have just one fractal Add more have them interact pass through one another style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png input type checkbox id cbColor randomize colors input script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d var exportImage document createElement img buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var cbColor document getElementById cbColor var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 2 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 8 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor 000000 urlColor 444444 lineWidth 2 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r0 g0 b0 var r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI var phaseVariance 0 2 Math PI 2 circles var randomizeColor cbColor checked for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR if randomizeColor r0 Math floor Math random 255 g0 Math floor Math random 255 b0 Math floor Math random 255 r1 Math floor Math random 255 g1 Math floor Math random 255 b1 Math floor Math random 255 c0 rgba r0 g0 b0 0 5 c1 rgba r1 g1 b1 0 5 grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 c0 grad addColorStop 1 c1 else if i 0 grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 rgba 200 140 0 0 1 grad addColorStop 1 rgba 220 10 0 0 1 grad addColorStop 1 rgba 0 170 255 0 5 grad addColorStop 0 rgba 255 0 170 0 5 else grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 rgba 220 100 40 0 5 grad addColorStop 1 rgba 255 255 40 0 5 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color grad can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 220 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase 2 Math random 1 phaseVariance the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 75 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 5 c centerY 0 04 yOffset 40 Math sin c globalPhase drawCount 2500 TWO_PI stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null you are drawing in new position by applying a transform This so the gradient will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY yOffset Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you will open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Different gradient types this uses a radial gradient style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d var exportImage document createElement img buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 1 maxMaxRad 200 minMaxRad 200 We draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 8 number of curves to draw on every tick of the timer drawsPerFrame 4 bgColor FFFFFF urlColor EEEEEE lineWidth 1 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r g b a var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR define gradient grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 1 rgba 0 200 140 0 2 grad addColorStop 0 rgba 0 180 10 0 2 var newCircle centerX maxR centerY displayHeight 2 50 maxRad maxR minRad minR color grad can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 250 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase Math random TWO_PI the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 75 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 5 c centerY 0 04 yOffset 40 Math sin c globalPhase drawCount 1000 TWO_PI stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null we are drawing in new position by applying a transform We are doing this so the gradient will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY yOffset Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 we will open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script More Mixing style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 2 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r0 g0 b0 var r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR r 100 Math floor Math random 155 g 100 Math floor Math random 155 b 100 Math floor Math random 155 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color rgba 0 0 0 0 15 fillColor rgba r g b 1 param 0 changeSpeed 1 300 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 8 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0001 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 25 c centerY 0 02 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next let dx point x nextPoint x let dy point y nextPoint y Try experimenting with these 2 lines e g let newX point x 0 5 dx dy Math random 2 1 let newY point y 0 5 dy dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Experimenting with the patterns style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 3 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r0 g0 b0 var r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR r 100 Math floor Math random 155 g 100 Math floor Math random 155 b 100 Math floor Math random 155 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color rgba 0 0 0 0 15 fillColor rgba r g b 1 param 0 changeSpeed 1 300 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 8 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0001 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 25 c centerY 0 02 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill var hack 0 0 Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio hack 0 01 pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next let dx point x nextPoint x let dy point y nextPoint y Try experimenting with these 2 lines e g let newX point x 0 5 dx dy Math random 2 1 0 001 let newY point y 0 5 dy dx Math random 2 1 Math sin hack 0 5 0 5 0 05 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script

r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI var phaseVariance 0 2 Math PI 2 circles var randomizeColor cbColor checked for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR if randomizeColor r0 Math floor Math random 255 g0 Math floor Math random 255 b0 Math floor Math random 255 r1 Math floor Math random 255 g1 Math floor Math random 255 b1 Math floor Math random 255 c0 rgba r0 g0 b0 0 5 c1 rgba r1 g1 b1 0 5 grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 c0 grad addColorStop 1 c1 else if i 0 grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 rgba 200 140 0 0 1 grad addColorStop 1 rgba 220 10 0 0 1 grad addColorStop 1 rgba 0 170 255 0 5 grad addColorStop 0 rgba 255 0 170 0 5 else grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 0 rgba 220 100 40 0 5 grad addColorStop 1 rgba 255 255 40 0 5 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color grad can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 220 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase 2 Math random 1 phaseVariance the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 75 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 5 c centerY 0 04 yOffset 40 Math sin c globalPhase drawCount 2500 TWO_PI stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null you are drawing in new position by applying a transform This so the gradient will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY yOffset Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you will open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Different gradient types this uses a radial gradient style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d var exportImage document createElement img buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 1 maxMaxRad 200 minMaxRad 200 We draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 8 number of curves to draw on every tick of the timer drawsPerFrame 4 bgColor FFFFFF urlColor EEEEEE lineWidth 1 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r g b a var maxR minR var grad circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR define gradient grad context createRadialGradient 0 0 minR 0 0 maxR grad addColorStop 1 rgba 0 200 140 0 2 grad addColorStop 0 rgba 0 180 10 0 2 var newCircle centerX maxR centerY displayHeight 2 50 maxRad maxR minRad minR color grad can set a gradient or solid color here fillColor rgba 0 0 0 1 param 0 changeSpeed 1 250 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase Math random TWO_PI the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 75 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0002 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 5 c centerY 0 04 yOffset 40 Math sin c globalPhase drawCount 1000 TWO_PI stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null we are drawing in new position by applying a transform We are doing this so the gradient will move with the drawing context setTransform xSqueeze 0 0 1 c centerX c centerY yOffset Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 xSqueeze rad Math cos theta y0 rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next dx nextPoint x point x newX 0 5 point x nextPoint x newY 0 5 point y nextPoint y newY dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 we will open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script More Mixing style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 2 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r0 g0 b0 var r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR r 100 Math floor Math random 155 g 100 Math floor Math random 155 b 100 Math floor Math random 155 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color rgba 0 0 0 0 15 fillColor rgba r g b 1 param 0 changeSpeed 1 300 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 8 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0001 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 25 c centerY 0 02 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next let dx point x nextPoint x let dy point y nextPoint y Try experimenting with these 2 lines e g let newX point x 0 5 dx dy Math random 2 1 let newY point y 0 5 dy dx Math random 2 1 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script Experimenting with the patterns style type text css body background color ffffff color 888888 style canvas id displayCanvas height 500 width 800 canvas input type button id btnRegenerate value regenerate input type button id btnExport value export image png script var displayCanvas document getElementById displayCanvas var context displayCanvas getContext 2d var displayWidth displayCanvas width var displayHeight displayCanvas height off screen canvas used only when exporting image var exportCanvas document createElement canvas exportCanvas width displayWidth exportCanvas height displayHeight var exportCanvasContext exportCanvas getContext 2d buttons var btnExport document getElementById btnExport btnExport addEventListener click exportPressed false var btnRegenerate document getElementById btnRegenerate btnRegenerate addEventListener click regeneratePressed false var numCircles var maxMaxRad var minMaxRad var minRadFactor var circles var iterations var timer var drawsPerFrame var drawCount var bgColor urlColor var TWO_PI 2 Math PI var lineWidth init function init In other experiments you may wish to use more fractal curves circles and allow the radius of them to vary If so modify the next three variables numCircles 3 maxMaxRad 200 minMaxRad 200 You ll draw closed curves with varying radius The factor below should be set between 0 and 1 representing the size of the smallest radius with respect to the largest possible minRadFactor 0 The number of subdividing steps to take when creating a single fractal curve Can use more but anything over 10 thus 1024 points is overkill for a moderately sized canvas iterations 9 number of curves to draw on every tick of the timer drawsPerFrame 5 bgColor FFFFFF urlColor EEEEEE lineWidth 2 startGenerate function startGenerate drawCount 0 context setTransform 1 0 0 1 0 0 context clearRect 0 0 displayWidth displayHeight setCircles if timer clearInterval timer timer setInterval onTimer 1000 50 function setCircles var i var r0 g0 b0 var r1 g1 b1 var c0 c1 var maxR minR var grad var phase Math random TWO_PI circles for i 0 i numCircles i maxR minMaxRad Math random maxMaxRad minMaxRad minR minRadFactor maxR r 100 Math floor Math random 155 g 100 Math floor Math random 155 b 100 Math floor Math random 155 var newCircle centerX maxMaxRad centerY displayHeight 2 50 maxRad maxR minRad minR color rgba 0 0 0 0 15 fillColor rgba r g b 1 param 0 changeSpeed 1 300 phase Math random TWO_PI the phase to use for a single fractal curve globalPhase phase the curve as a whole will rise and fall by a sinusoid circles push newCircle newCircle pointList1 setLinePoints iterations newCircle pointList2 setLinePoints iterations function onTimer var i j var c var rad var point1 point2 var x0 y0 var cosParam var xSqueeze 0 8 cheap 3D effect by shortening in x direction var yOffset draw circles for j 0 j drawsPerFrame j drawCount for i 0 i numCircles i c circles i c param c changeSpeed if c param 1 c param 0 c pointList1 c pointList2 c pointList2 setLinePoints iterations cosParam 0 5 0 5 Math cos Math PI c param context strokeStyle c color context lineWidth lineWidth context fillStyle c fillColor context beginPath point1 c pointList1 first point2 c pointList2 first slowly rotate c phase 0 0001 theta c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad move center c centerX 0 25 c centerY 0 02 stop when off screen if c centerX displayWidth maxMaxRad clearInterval timer timer null Drawing the curve involves stepping through a linked list of points defined by a fractal subdivision process It is like drawing a circle except with varying radius x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 while point1 next null point1 point1 next point2 point2 next theta TWO_PI point1 x cosParam point2 x point1 x c phase rad c minRad point1 y cosParam point2 y point1 y c maxRad c minRad x0 c centerX xSqueeze rad Math cos theta y0 c centerY rad Math sin theta context lineTo x0 y0 context closePath context stroke context fill var hack 0 0 Here is the function that defines a noisy but not wildly varying data set which we will use to draw the curves function setLinePoints iterations var pointList pointList first x 0 y 1 var lastPoint x 1 y 1 var minY 1 var maxY 1 var point var nextPoint var dx newX newY var ratio hack 0 01 pointList first next lastPoint for var i 0 i iterations i point pointList first while point next null nextPoint point next let dx point x nextPoint x let dy point y nextPoint y Try experimenting with these 2 lines e g let newX point x 0 5 dx dy Math random 2 1 0 001 let newY point y 0 5 dy dx Math random 2 1 Math sin hack 0 5 0 5 0 05 var newPoint x newX y newY min max if newY minY minY newY else if newY maxY maxY newY put between points newPoint next nextPoint point next newPoint point nextPoint normalize to values between 0 and 1 if maxY minY var normalizeRate 1 maxY minY point pointList first while point null point y normalizeRate point y minY point point next unlikely that max min but could happen if using zero iterations In this case set all points equal to 1 else point pointList first while point null point y 1 point point next return pointList function exportPressed evt background otherwise background will be transparent exportCanvasContext fillStyle bgColor exportCanvasContext fillRect 0 0 displayWidth displayHeight draw exportCanvasContext drawImage displayCanvas 0 0 displayWidth displayHeight 0 0 displayWidth displayHeight add printed url to image exportCanvasContext fillStyle urlColor exportCanvasContext font bold italic 16px Helvetica Arial sans serif exportCanvasContext textBaseline top var metrics exportCanvasContext measureText rectangleworld com exportCanvasContext fillText rectangleworld com displayWidth metrics width 10 5 you ll open a new window with the image contained within retrieve canvas image as data URL var dataURL exportCanvas toDataURL image png open a new window of appropriate size to hold the image var imageWindow window open fractalLineImage left 0 top 0 width displayWidth height displayHeight toolbar 0 resizable 0 write some html into the new window creating an empty image imageWindow document write title Export Image title imageWindow document write img id exportImage alt height displayHeight width displayWidth style position absolute left 0 top 0 imageWindow document close copy the image into the empty img in the newly opened window var exportImage imageWindow document getElementById exportImage exportImage src dataURL function regeneratePressed evt startGenerate console log ready script

3dplot
a4print
about
acejs
acejs2
acejs3
aessecurity
angularjs
animbackgroundimage
aseformat
assert
asteroidsjs
backgrounds01
backgrounds02
backgrounds03
barnsleyfern
base26
base64
bib
binary
bodypix
bouncy
box2dweb
breakoutjs
browserversion
buslanes
busybutton
bvhreader
calendar
candycrush
candycrush2
canvas
canvas2
canvas3
canvasmandelbrot
canvasmandelbrot2
canvasnumbers
canvaszoom
capsule
changingimages
chaosgame
chaosrandom
chaosrandomhisto
chaosrandomhisto2
chatgptusingopenai
chatgptusingopenai2
chatgptusingopenai3
checkboxtoggle
chinesetiles
classes
classfeatures
clipboardbutton
clonenode
codedropdown
codemirror
codemirror2
collada
colorpick
columnresizer
contextmenu
convnet
cookiebanner
countdown
countdown2
countdown3
crop
css3dbarchart
css3dbarchart2
css3dbook
css3dscene
csscube
csscube2
csscube3
csscubevideos
cssfilelist
csshas
csspulse
cssresizeaspect
cssspin
csszooming
csvtoarray
curleffect
customcheckbox
d3datamap
d3js
d3js10
d3js11
d3js2
d3js3
d3js4
d3js5
d3js6
d3js7
d3js8
d3js9
d3jsanimatedgrid
d3jsarctransition
d3jsarctransition2
d3jsaxis
d3jsaxischanging
d3jsbars
d3jsbrushing
d3jsbuslanes
d3jsbuslanes2
d3jscalendar
d3jscheat
d3jsclock
d3jscloudmap
d3jscogs
d3jscolors
d3jscovid
d3jscovid2
d3jscovid3
d3jsdashboard
d3jsdashboard2
d3jsdashboard3
d3jsdatakeyfunction
d3jsdensity
d3jsdragresizing
d3jsdragresizing2
d3jseach
d3jsease
d3jsevents
d3jsflower
d3jsforcegroups
d3jsforces
d3jsforces2
d3jsfractaltree
d3jsgeo
d3jsgroupbars
d3jsgroups
d3jsheatmap
d3jshex
d3jshierarchies
d3jshierarchies2
d3jshistogram
d3jshistogram2
d3jshistogram3
d3jshistogram4
d3jsinterpolate
d3jsjoin
d3jskmean
d3jskmean2
d3jsline
d3jsline2
d3jsline3
d3jsline4
d3jslinetransition
d3jslinetransition0
d3jslinetransition2
d3jsmaplocations
d3jsmaps
d3jsmaps2
d3jsmaps3
d3jsmisc
d3jsmisc2
d3jsmodule
d3jsmodulecolor
d3jsmultistyles
d3jsnobel
d3jsoverlappinggraphs
d3jspanel
d3jspie
d3jspieinterpolate
d3jssankey
d3jssankey2
d3jsscatter
d3jsshapes
d3jsslider
d3jsspending
d3jsspending2
d3jsspiralplot
d3jsspirograph
d3jssquare
d3jsstack
d3jsstackedbar
d3jsstackedbar2
d3jssunburst
d3jssunmoon
d3jssvglines
d3jssymbols
d3jstimelines
d3jsuk
d3jsvoronoi
d3scatterplot
d3timeline
d3timeline2
datalist
datamuse
date
dblclickhighlight
deviceorientation
dictionaryapi
dockermenu
doodlepad
downloadgif
dragdroplistitems
dragrotateresizediv
dragrotateresizediv2
dragrotateresizediv3
dragrotateresizediv4
dragrotateresizefontsize
dragselectbrush
drawlinesdiv
dropdown
dualquaternionimages
dynamicgrid
easefunctions
easeinterpolate3dplots
echart
echart2
echart3
encapsulation
epubviewer
errorstack
excalidraw
excalidraw2
excalidraw3
excalidraw5
expandable
faker
fetchplus
fileupload
fixedtopbar
fluiddynamics
fluiddynamics2
fluiddynamics3
fluidsmokedynamics
fluidsmokedynamics2
fonts
fonts2
footerbar
fractalmaze
fractalmaze2
fractalnoiseimage
fractals
fractals2
fractaltree
freesvg
fresnel
froggerjs
gantt
gifgiphyapi
gifhex
gltffromscratch
gradients
griditems
griditems2
griditems3
griditems4
gridworms
heat
hexview
hexview2
highlight
icons
icons2
iframes
ik
imagetracertosvg
imgur
inputfile
invadersjs
ipynb
ipynb2
ipynb3
ipynb4
isbn13
isbn2
jpghex
jquery
jquery2
jqueryui
jqueryui2
jsdraganddrop
jsfire
jslint
jsobfuscate
jsraytracer
jstree
jstree2
jszip
jszipimages
jszipread
keyframes
l2dwidget
lda
leftmenu
less
less2
lineargradientimage
linenumbers
loadimagefromfile
makepdf
maps
markdown
markdown2
markdownalerts
markdownalerts2
markdownbookmarks
markovimage
markovpixelblocks
mathjax
matrices
matsandvects
mazegamejs
md2tex
metrotiles
metrowindows
milestones
minkowski2dboxes
misc
misc2
modules
myipdetails
neataptic
networkstructures
networkstructures2
neural_network_plot_in_vs_out
neuralnetworkarrays
neuralnetworkblocks
neuralnetworksinewave
neuralnetworksnolibs
neuralnetworkvisualization
number
obj
objtojson
openaiimages
opencv
opencv2
opencv3
opencv4
opencv5
outline
p2
p5fractalleaf
p5fractalshape
p5js
p5js2
p5js3
p5jsanimatedcover
p5mengercube
p5snowflakes
palindrome
panel
parallax
paste
paste2
pasteimgfromurl
pdfjs
pdfjs2
pdfkit
pdfkit2
pdfkit3
pdfkit4
pdfkit5
pdfkit6
pdfmake
pdfmake2
pdfmake3
pdfmake4
pdfmake5
pdfmake6
perlin
perlin2
perlin3
perspective
pexels
playground
plotly
plotlynoise
plotlyranddist
plyloader
plyloader2
pngtxtencoder
pongjs
pptxgenjs
prettycode
prism
prn
problems
progress
pseudorandom
px2svg
python
quotes
racergame
random
randomcalcpie
randomgenerator
randomprofilepatterns
randomsinhistogram
randomstring
rating
rayambient
raymonte
raymonteprogressive
raymonteprogressive2
raymontewarmstart
reexpcross
reexpcross2
regex
regexbib
regexpfixbib
regexpmultiline
repeatwordsregexp
resizabletable
resizabletable2
revealjs
revealjs2
revealjsmulti
ritalanguage
ritalanguage2
ritalanguage3
rotateimg
rough
rsapublicprivatekeys
rss
rss2
sankey
scrappingsvg
scrolltext
scrolltext2
scrollwidth
sdfboxinboxtwist
sdfhollowbox
setintervalexception
shareurl
shuffle
sidecomment
similarity
simplehighlighter
simpleplatformgamejs
sinecanvas
sliderpopout
slides
smileys
snowfall
snowman
sound
soundsignal
sphererayintersection
springs
sqljs
steganography
stereogram
stringmatching
svg
svgchaos
svgdragresize
svgdragresize2
svgdragresize3
svgdragrotate
svgdrawing
svglines
svglines2
svglines3
svglines4
svglines5
svglinesmandelbrot
svgpathsdragrotate
svgpathsdragrotateresize
svgpie
svgpie2
svgpie3
svgpiepath
svgpiepath2
svgrandomfaces
symbols
synaptic
synaptic2
synonyms
tablerotatecells
tablerotatecells2
tablerotatecells3
tablerotatecells3b
tablerotatecells4
tables
tablezebra
tabularjs
tabularjs2
tabulatordownload
tagcanvas
tensorflowgan
tensorflowjs
tensorflowjsbasic
tensorflowjscnn
tensorflowjssinewave
tensorflowjssound
tensorflowmobilenet
tetrahedronfractal
tetrahedronfractalfolding
tetris
textarea
textareaauto
textareadiv
textareadiv2
textmaskimage
theirorthere
thesaurus
threejs
threejs2
threejs3
threejs4
threejsgltf
threejstokyo
tiles
toaster
tooltip
transition
transitionexpandabledropdown
treeview
treeview2
tricks
tshirt
tshirt2
tshirt3
turningpages
unsplash
urlblob
urlblob2
userdefinepoints
vector
videos
videos2
visualsort
vue
w2ui
w2uientertextdialog
webcam
webgl
webgl2
webgl3
webgl4
webgl5
webglbasic1
webglbasic2
webglcube
webglfov
webglfrustum
webgljson
webglleaves
webgllighting
webglorthographic
webglpoints1
webglpoints2
webglpoints3
webglsquare
webgltexture1
webgltexture2
webgltexture3
webgltransforms
webgltriangle
webgpu
webgpu10
webgpu11
webgpu12
webgpu13
webgpu14
webgpu15
webgpu16
webgpu17
webgpu2
webgpu3
webgpu4
webgpu5
webgpu6
webgpu7
webgpu8
webgpu9
webgpubars
webgpubuffers
webgpubuffers2
webgpucellnoise
webgpuclouds
webgpuclydescope
webgpucompute
webgpucubemap
webgpucubemap2
webgpudeferred
webgpudepth
webgpudof
webgpudrops
webgpuetha
webgpufire
webgpufractalcubes
webgpuglassrain
webgpugltf
webgpugltf2
webgpugrass
webgpugrid
webgpukernel
webgpukleinian
webgpulabupdates
webgpulighting
webgpumandelbrot
webgpumeta3d
webgpumetaballs
webgpumouse
webgpunoise
webgpunormalmapping
webgpuobj
webgpuparallax
webgpuparallax2
webgpuparallax3
webgpuparallaxshadow
webgpuparallaxshadow2
webgpupixel
webgpuquad
webgpuray1
webgpuraytracing
webgpuraytracing2
webgpushadowmaps
webgpushadowmaps2
webgpusierpinski2d
webgpusierpinski3d
webgpusinusoid
webgpussao
webgpustadiumobj
webgpuswirl
webgputestpipe3
webgputoon
webgputopology
webgputt
webgpuvolcloud
webgpuwater
webgpuwireframe
webgpuwireframe2
webpcanvas
webworkers
webxr
webxr2
wiggly
wikipedia