Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions Fourier_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Steps of Run the Code

## 1. want to run the other file `(*.java)`

[IDEA]( https://www.jetbrains.com/idea/ ) is the nice IDE, for this project is built by gradle, what you need do is just clone this repo with using Git:

```shell
git clone https://github.com/zhuyuezx/Processing_Tutorial
```

And then use IDEA to open the folder `Processing_Tutorial`. Wait for anything is done. Finally, open one of the java file and right click with you mouse in the background and select Run:

<img src="https://raw.githubusercontent.com/cyantau/PicBed/main/typoraUsing/image-20220525093948982.png" alt="s" style="zoom:40%;" /> <img src="https://raw.githubusercontent.com/cyantau/PicBed/main/typoraUsing/image-20220525102914225.png" alt="image-20220525102914225" style="zoom:50%;" />

Enjoy it.



## 2. Want run `svg_interpreter (*.pde)`

[where svg may be typed as svp?]

- Download the [Processing](https://processing.org/download). I recommend you to use version before 4.0, otherwise some problems may encounter like:

> field not found: frame

- Unzip it and open `processing.exe`

- Download [Video Export](https://funprogramming.org/VideoExport-for-Processing/download/VideoExport-23.zip) : https://funprogramming.org/VideoExport-for-Processing/

> Unzip and put the extracted VideoExport folder into the libraries folder of your Processing sketches. Reference and examples are included in the VideoExport folder.

​ The libraries folder of your Processing sketches is usually in `T:\Documents\Processing` for windows.

- Download [ffmpeg](https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z) : https://ffmpeg.org/download.html

> You need to download and install ffmpeg on your system before you can use VideoExport . Note that you might already have it installed! You can find out by typing ffmpeg or ffmpeg.exe in the terminal. If the program is not found

- Open one of `*.pde` file in with Processing program and change the path below :

<img src="https://raw.githubusercontent.com/cyantau/PicBed/main/typoraUsing/image-20220525103403565.png" alt="image-20220525103403565" style="zoom:80%;" />

- Change the parameters in the file as you like and Run.
- Enjoy it
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Tutorial Code

Read the [Fourier_README](./Fourier_README.md) to get more steps about Tutorial of Fourier Drawing for the svg file, which may help you run the code on your own.

## You can find the video tutorial [here](https://www.youtube.com/c/thedotisblack/videos)
The original code is based on [thedotisBlack.com](https://www.thedotisBlack.com), where I do sligh perosnal modifications that make them more interesting (at least from my perspective).

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/proc/First.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void draw() {
}

public static void main(String... args) {
PApplet.main("proc.sketches.First");
PApplet.main("proc.First");
}

}
14 changes: 14 additions & 0 deletions src/main/java/proc/FourierDrawing/svg_interpreter/rec.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
final String sketchName = getClass().getName();

import com.hamoid.*;
VideoExport videoExport;

void rec() {
//if (frameCount == 1) {
// videoExport = new VideoExport(this, "../"+sketchName+".mp4");
// videoExport.setFrameRate(30);
// videoExport.startMovie();
//}

//videoExport.saveFrame();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ void setup() {
fullScreen();
//size(960, 1080);

String path = extractSvg("D:/processing_code/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/Pi-symbol.svg");
//String path = extractSvg("T:/StudyDoc/ComputerLanguage/Java/Processing_Fourier/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/Pi-symbol.svg");
//String path = extractSvg("D:/processing_code/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/france-23502.svg");
//String path = extractSvg("D:/processing_code/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/britain.svg");
//String path = extractSvg("D:/processing_code/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/Russia.svg");
String path = extractSvg("T:/StudyDoc/ComputerLanguage/Java/Processing_Fourier/Processing_Tutorial/src/main/java/proc/FourierDrawing/svp_interpreter/Russia.svg");
commands = extractCommands(path);
commandsAutoFill();

Expand All @@ -43,6 +43,6 @@ void draw() {
}

void savePic() {
if (frameCount % 100 == 0)
saveFrame("rolling/rolling-####.jpg");
//if (frameCount % 100 == 0)
// saveFrame("rolling/rolling-####.jpg");
}
14 changes: 0 additions & 14 deletions src/main/java/proc/FourierDrawing/svp_interpreter/rec.pde

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/proc/Screen.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void draw() {


public static void main(String... args) {
PApplet.main("proc.sketches.Screen");
PApplet.main("proc.Screen");
}

}