Skip to content

Processing script that creates shapes from lines only

License

Notifications You must be signed in to change notification settings

Relex12/Lining-draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lining-draw

Processing script that creates shapes from lines only

Look it on GitHub:

lining-draw

Read in French.


Summary

What is it?

Lining-draw is Processing project that can draw various shapes from border-to-border lines only.

All you can draw are curves, by increasing or decreasing the coordinates of the lines.

What it looks like

Here are two examples of pre-recorded figures:

Capture1

Capture2

How to use

Processing is required.

  1. Download or clone the repository
  2. In the drawing/ directory, run drawing.pde
  3. Click the run button to execute

Code explanation

In the drawing/ directory, there are three scripts:

  • drawing.pde is the script you will have to execute, it calls a figure function in a switch structure and defines the step and maxVal values
  • figures.pde is where are defines all the figures, you can find the basic shape and the four-ray star shape shown above, and a few others, and this is where you are willing to create your own figures
  • fonctions.pde provides functions for the four up/down left/right corners that are called for every figure

What you can change

In the drawing.pde script, you can modify the size of the result window. By changing the step value, you change how dense it is filled. The figure variable is only used in the switch that makes you changing the figure quickly.

You can add you own figures in the figures.pde script. Make sure you understand how the others work.

Repository status: Finished

The project was a short one, the author worked alone on this for a short time. The code is given to the GitHub Community for free, only under th MIT License, that is not too restrictive.

If you want to add some features, just fork the repository. There is no plan to accept Pull Requests, but who knows.

Processing compatibility

As it is a small project, the code has only been tested under Processing 3 (3.5.4). I hope it will work with every older and newer versions.

Enjoy !

About

Processing script that creates shapes from lines only

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages