Last active
May 20, 2017 02:38
-
-
Save gaocegege/aca96749d0dc70be3fbe915c4d7eac8a to your computer and use it in GitHub Desktop.
Examples for Processing.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yPos <- 0 | |
draw <- function() { | |
processing$background(as.integer(204)) | |
yPos <- yPos - 1 | |
if (yPos < 0) { | |
yPos <- height | |
} | |
processing$line(0, yPos, width, yPos) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yPos <- 0 | |
settings <- function() { | |
stdout$print("Set width and height.") | |
processing$size(500, 500) | |
} | |
draw <- function() { | |
processing$background(as.integer(204)) | |
yPos <- yPos - 1 | |
if (yPos < 0) { | |
yPos <- height | |
} | |
processing$line(0, yPos, width, yPos) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment