Notebook - Welcome to Notebook

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












style SVG styling svg width 840px height 600px path line style div id chart svg svg div button class regenerate Regenerate button script type text javascript src https d3js org d3 v7 min js script script Tree configuration var branches var seed i 0 x 420 y 600 a 0 l 100 d 0 a angle l length d depth var da 0 3 Angle delta var dl 0 85 Length delta factor var ar 0 7 Randomness var maxDepth 10 Tree creation functions function branch b var end endPt b daR newB branches push b if b d maxDepth return Left branch daR ar Math random ar 0 5 newB i branches length x end x y end y a b a da daR l b l dl d b d 1 parent b i branch newB Right branch daR ar Math random ar 0 5 newB i branches length x end x y end y a b a da daR l b l dl d b d 1 parent b i branch newB function regenerate k initialise console log regenerate initialise branches branch seed initialise create update function endPt b Return endpoint of branch var x b x b l Math sin b a var y b y b l Math cos b a return x x y y D3 functions var color d3 scaleLinear domain 0 maxDepth range black purple function x1 d return d x function y1 d return d y function x2 d return endPt d x function y2 d return endPt d y function highlightParents e d var colour e type mouseover green color d d var depth d d for var i 0 i depth i d3 select id parseInt d i style stroke colour d branches d parent function create d3 select svg selectAll line data branches enter append line attr x1 x1 attr y1 y1 attr x2 x2 attr y2 y2 style stroke width function d var t parseInt maxDepth 5 1 d d 5 return t px style stroke function d return color d d attr id function d return id d i on mouseover highlightParents on mouseout highlightParents function update d3 select svg selectAll line data branches transition attr x1 x1 attr y1 y1 attr x2 x2 attr y2 y2 d3 selectAll regenerate on click regenerate regenerate null true console log ready script style body min height 600px style script type text javascript src https d3js org d3 v7 min js script script var w 600 var h 600 var theta 12 Math PI 190 var length 29 var x0 w 2 var y0 h var t0 Math PI 2 5 function tree string var tree root path M x0 y0 children step x x0 y y0 t t0 branch root var instructions F function step x length Math cos step t step y length Math sin step t step branch path L step x step y function step t theta function step t theta function tree push step step Object create step var branch path M step x step y children step branch children push branch step branch branch function step tree pop string split forEach function a instructions a return root var svg d3 select body append svg attr width w attr height h datum tree line 4 F F F F F FF FF F F F each grow function grow d d3 select this append path attr stroke black attr stroke opacity 0 45 attr stroke width function d i i Math PI 38 attr fill none attr d function d return d path d3 select this selectAll g data d children enter append g transition on start grow function line n rules axiom if n 0 return axiom else return line n rules axiom replace g function a return rules a a console log ready script style body height 600px min height 600px style script type text javascript src https d3js org d3 v7 min js script script var width window innerWidth var height window innerHeight var svg d3 select body append svg attr width width attr height height var elementCount svg append text attr x width 2 attr y height 20 attr text anchor middle attr fill gray var format d3 format var nMax 100 var mouseX 800 var mouseY 200 var scaleFactor 0 99 function redraw var scale 14 angle mouseY height Math PI 8 n Math floor nMax mouseX width up Math PI render fractal width 2 height 136 up scale angle 0 n false function fractal x y direction scale angle i n flip var circle x x y y radius scale 2 if i n if i 11 0 return circle concat fractal x y direction scale angle i 1 n flip concat fractal x y direction scale angle i 1 n flip else return circle concat fractal x Math sin direction scale y Math cos direction scale direction angle flip 1 1 scale scaleFactor angle i 1 n flip return circle function r return Math floor Math random 255 function render data var circles svg selectAll circle data data circles enter append circle merge circles attr cx function d return d x attr cy function d return d y attr r function d return d radius attr fill function return rgb r r r join circles exit remove elementCount text format data length SVG Circle elements redraw document addEventListener mousemove function e mouseX e x 2 mouseY e y redraw script

ta function tree push step step Object create step var branch path M step x step y children step branch children push branch step branch branch function step tree pop string split forEach function a instructions a return root var svg d3 select body append svg attr width w attr height h datum tree line 4 F F F F F FF FF F F F each grow function grow d d3 select this append path attr stroke black attr stroke opacity 0 45 attr stroke width function d i i Math PI 38 attr fill none attr d function d return d path d3 select this selectAll g data d children enter append g transition on start grow function line n rules axiom if n 0 return axiom else return line n rules axiom replace g function a return rules a a console log ready script style body height 600px min height 600px style script type text javascript src https d3js org d3 v7 min js script script var width window innerWidth var height window innerHeight var svg d3 select body append svg attr width width attr height height var elementCount svg append text attr x width 2 attr y height 20 attr text anchor middle attr fill gray var format d3 format var nMax 100 var mouseX 800 var mouseY 200 var scaleFactor 0 99 function redraw var scale 14 angle mouseY height Math PI 8 n Math floor nMax mouseX width up Math PI render fractal width 2 height 136 up scale angle 0 n false function fractal x y direction scale angle i n flip var circle x x y y radius scale 2 if i n if i 11 0 return circle concat fractal x y direction scale angle i 1 n flip concat fractal x y direction scale angle i 1 n flip else return circle concat fractal x Math sin direction scale y Math cos direction scale direction angle flip 1 1 scale scaleFactor angle i 1 n flip return circle function r return Math floor Math random 255 function render data var circles svg selectAll circle data data circles enter append circle merge circles attr cx function d return d x attr cy function d return d y attr r function d return d radius attr fill function return rgb r r r join circles exit remove elementCount text format data length SVG Circle elements redraw document addEventListener mousemove function e mouseX e x 2 mouseY e y redraw 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
canvas
canvas2
canvas3
canvasmandelbrot
canvasmandelbrot2
canvasnumbers
canvaszoom
capsule
changingimages
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
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
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
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
misc
misc2
modules
myipdetails
neataptic
networkstructures
networkstructures2
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
randomprofilepatterns
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