e.g., mouse, keyboard
e.g., visualization, fractal, mouse
Learn more about Creative Commons
Join Plus+ to change privacy settings
  • (using google translation)


    There are multiple pages. Use the "←" "→" buttons below to switch.

    The second page explains the UI.


    I will explain the sketches I made in the past.

    Some variable names have been changed. I wanted to explain in order, so I divided the processing in detail. The UI has been added so the code is getting longer ...


    The most important is the function from draw1() to draw6().


    draw4() is similar to this sketch.

    https://www.openprocessing.org/sketch/748836

    draw5() is similar to this sketch.

    https://www.openprocessing.org/sketch/754815

    draw6() is similar to this sketch.

    https://www.openprocessing.org/sketch/755877


    Video of this sketch in action (Twitter)

    https://twitter.com/BUN_information/status/1195300719231791104


    ** Added on May 8, 2021 **

    Gorilla Sun has written an explanation of each part with animations on his blog. Thank you!

    https://gorillasun.de/blog/Simulating-brush-strokes-with-Hookes-Law-in-P5JS-and-Processing

  • How to use UI

    You can switch functions from draw1() to draw6() with buttons. The "clear canvas" button allows you to switch between calling and not calling clear() in draw().

    You can adjust various parameters with sliders. The parameter value can be reset by pressing the "reset property" button. Parameter sliders that are not used in function have a black background.

    About various parameters

    • size : Brush size
    • spring : Spring constant(Larger value means stronger spring)
    • friction : Friction(Smaller value means, the more slippery)
    • splitNum : Number of divisions from old coordinates to new coordinates
    • diff : Misalignment of different lines


1/2
  • mySketch
  • v1.11.3
  • v1.11.2
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.4
  • v1.9.3
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.0
  • v1.7.0
  • v1.6.0
  • v1.5.0
  • v1.4.2
  • v1.4.1
  • v1.4.0
  • v1.3.1
  • v1.3.0
  • v1.2.0
  • v1.1.9
  • v1.1.7
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.0.0
  • v0.10.2
  • v0.9.0
  • v0.8.0
  • v0.7.3
  • v0.7.2
  • v0.6.1
  • v0.6.0
  • v0.5.16
  • v0.5.11
  • v0.5.8
  • v0.5.7
  • v0.5.2
Select mode or a template
Centers sketch and matches the background color.
Prevents infinite loops that may freeze the sketch.
This will be the default layout for your sketches
Easy on the eyes
It will show up when there is an error or print() in code
Potential warnings will be displayed as you type
Closes parenthesis-like characters automatically as you type

Controls
Play
Ctrl+Enter
Code
Ctrl+Shift+Enter
Save
Ctrl+S
Interface
Fullscreen
Ctrl+Alt+F
Switch Layout
Ctrl+Alt+L
Settings
Ctrl+Alt+.
Editor
Tidy Code
Ctrl+B
Multiple Cursors
Ctrl+Click
Duplicate Line/Selection
Ctrl+Shift+D
Move Line
Alt+↑/↓
Select Multiple
Ctrl+D
Find in Code
Ctrl+F
Find Next
Ctrl+G
Find Previous
Ctrl+Shift+G

See More Shortcuts

Join Plus+ for private sketches, version history, 1GB space, custom embeds, and more!