This file contains hidden or 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
''' | |
20 Nov, Dealga McArdle. 2011 | |
This script is released under the MIT license. With no warranty/support of any kind. | |
PostScript to javascript/paperjs converter written in Python. It should be | |
obvious to anyone with a brain that Adobe and PostScript are registered trademarks. | |
The Adobe PostScript References, PLRM.pdf, is available for free from their site. | |
Their TOC implies that it's OK to write programs that parse their .ps filetype. | |
I plan to support commands as i encounter them. |
This file contains hidden or 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
''' | |
20 Nov, Dealga McArdle. 2011 | |
This script is released under the MIT license. With no warranty/support of any kind. | |
PostScript to javascript/paperjs converter written in Python. It should be | |
obvious to anyone with a brain that Adobe and PostScript are registered trademarks. | |
The Adobe PostScript References, PLRM.pdf, is available for free from their site. | |
Their TOC implies that it's OK to write programs that parse their .ps filetype. I plan | |
to support commands as i encounter them. |
This file contains hidden or 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
%!PS-Adobe-3.0 | |
%%Creator: cairo 1.10.2 (http://cairographics.org) | |
%%CreationDate: Sun Nov 20 23:46:08 2011 | |
%%Pages: 1 | |
%%BoundingBox: 0 0 757 126 | |
%%DocumentData: Clean7Bit | |
%%LanguageLevel: 2 | |
%%DocumentMedia: 267x44mm 757 126 0 () () | |
%%EndComments | |
%%BeginProlog |
This file contains hidden or 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
''' | |
20 Nov, Dealga McArdle. 2011 | |
This script is released under the MIT license. With no warranty/support of any kind. | |
PostScript to javascript/paperjs converter written in Python. It should be | |
obvious to anyone with a brain that Adobe and PostScript are registered trademarks. | |
The Adobe PostScript References, PLRM.pdf, is available for free from their site. | |
Their TOC implies that it's OK to write programs that parse their .ps filetype. I plan | |
to support commands as i encounter them. |
This file contains hidden or 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
%!PS-Adobe-3.0 | |
%%Creator: cairo 1.10.2 (http://cairographics.org) | |
%%CreationDate: Sun Nov 20 23:46:08 2011 | |
%%Pages: 1 | |
%%BoundingBox: 0 0 757 126 | |
%%DocumentData: Clean7Bit | |
%%LanguageLevel: 2 | |
%%DocumentMedia: 267x44mm 757 126 0 () () | |
%%EndComments | |
%%BeginProlog |
This file contains hidden or 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
size(400,400); | |
background(0); | |
noFill(); | |
stroke(255); | |
for (int i = 90; i < 270; i++){ | |
PVector coordinate = new PVector(cos(radians(i))*150, sin(radians(i))*150); | |
point(coordinate.x+200, coordinate.y+200); | |
This file contains hidden or 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
size(400,400); | |
background(0); | |
noFill(); | |
stroke(255); | |
for (int i = 90; i < 270; i++){ | |
PVector coordinate = getVectorFromDegree(i); | |
point(coordinate.x+200, coordinate.y+200); | |
This file contains hidden or 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
void setup() { | |
size(400, 400); | |
background(0); | |
noFill(); | |
stroke(255); | |
} | |
void draw() { | |
beginShape(); | |
for (int i = 90; i < 270; i++) { |
This file contains hidden or 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
// super class | |
import java.util.ArrayList; | |
class GraphicsObject { | |
PVector pos; | |
int overthreshold = 2; | |
GraphicsObject(PVector _pos) { | |
pos = _pos; | |
} |
This file contains hidden or 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
''' | |
BEGIN GPL LICENSE BLOCK | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |