Public Voice Network
- As3 mc help
- Learn how to drive? 44
- What are you listening to… 46944694
- Vid of the Day 1202112021
- Coda 2 2424
- Name something... 3939
- 40GB 1010
- Kids Helmet Dilemma 1010
- the gif animation thread 1280412804
- what happened? 55
- Wallpapers
- Pic of the Day 6326963269
- Illustration/Photography
- Melbourne Web Agencies 22
- shopped? 11
- Earth in HD 22
- 2Pac Hologram. Howd they … 7575
- WANT of the day 11741174
- first world problems 773773
- Creating the Windows 8 Us… 2525
- Commonly Mispronounced Wo… 5858
- How the hell 2323
- Make Me Laugh! 5151
- dont feel like working 2424
Filter
Processing Sketches Aug 26, 10, 10:55 p.m.
Processing: How to code least common denominator Aug 23, 10, 9:23 p.m.
Does anyone know how i could write a program to find the least common denominator say between 3 and 4 in processing?
processing OOP Aug 13, 10, 12:56 a.m.
I'm having trouble with some objects in processing.
the code should have two objects displayed and moving. but i only see one object displayed and moving. maybe there's something i'm missing. check out the code.
Rule myRule;
Rule myRule1;
void setup() {
size(200,200);
smooth();
//Initialize rule objects
myRule = new Rule(0,100,1);
myRule1 = new Rule(0,110,1);
}
void draw() {
background(255);
//int x1 = 0;
//int y1 = 0;
//Operate Rule object
myRule.move();
myRule.display();
myRule1.move();
myRule1.display();
}
class Rule {
float x;
float y;
float spacing;
float speed;
Rule(float x1, float y1, float s1) {
x = x1;
y = y1;
spacing = 10;
speed = s1;
}
void move() {
x = x + speed;
if((x > width) || (x < 0)) {
speed = speed * -1;
}
}
//Display lines at x location
void display() {
stroke(0);
fill(175);
line(x, height/2, width/2, height/2);
}
}
code redesign Aug 6, 10, 8:21 a.m.
so i'm thinking that perhaps the best way to learn some programming is to redesign code. there are some differences between the code below. I believe in the idea of designing one thing and then move on to the next. I've also started working backwards and forwards simultaneously. i think i have a better understanding of what i'm doing that way...perhaps it's a quirk.
notes: i started of using nested parentheses, then adjusting the values. The original code doesn't use nested parentheses (minor point, i guess for my thinking it makes sense! but for the original it isn't required. perhaps not succinct enough in my version.
c1dir = c1dir * -1; //in my version
c1dir * = -1; //in 'official' version
these are obviously not different, but the 'official' version's syntax was a bit perplexing...mine made more sense to me...i guess it was reading the c1dir * that through me off.
let me know what you guys think...beauty is also a criteria!
Here's my version:
float c1 = 0;
float c2 = 255;
float c1dir = 0.1;
float c2dir = -0.1;
void setup() {
size(200, 200);
}
void draw() {
noStroke();
//Adjust values
c1 = c1 + c1dir;
c2 = c2 + c2dir;
//if color 1 is less than 0 or color 1 is greater than 255 reverse direction
if ((c1 < 0) || (c1 > 255)) {
c1dir = c1dir * -1;
}
// if color 2 is less than 0 or color 2 is greater than 255 reverse direction
if ((c2 < 0) || (c2 > 255)) {
c2dir = c2dir * -1;
}
//Draw left rectangle
fill(c1,0,c2);
rect(0,0,100,200);
//Draw right rectangle
fill(c2,0,c1);
rect(100,0,100,200);
}
Here is the official version
// Two variables for color.
float c1 = 0;
float c2 = 255;
// Start by incrementing c1.
float c1dir = 0.1;
// Start by decrementing c2.
float c2dir = -0.1;
void setup() {
size(200,200);
}
void draw() {
noStroke();
// Draw rectangle on left
fill(c1,0,c2);
rect(0,0,100,200);
// Draw rectangle of right
fill(c2,0,c1);
rect(100,0,100,200);
// Adjust color values
c1 = c1 + c1dir;
c2 = c2 + c2dir;
// Instead of reaching the edge of a window, these variables reach the "edge" of color:
// 0 for no color and 255 for full color.
// When this happens the direction is reversed.
// Reverse direction of color change
if (c1 < 0 || c1 > 255) {
c1dir *= -1;
}
if (c2 < 0 || c2 > 255) {
c2dir *= -1;
}
}
Boolean variables Aug 5, 10, 5:20 p.m.
I need to understand why or if it is necessary to set the boolean variable to 'false', why not 'true'? confused...
and i've figured out that going with my intuition is pretty much always false...i need to think like a computer...still learning how that goes beyond following instructions...question is "which instructions to set, where? why?
// Boolean variable starts as false
boolean going = false;
// Location of circle
int circleX = 0;
int circleY = 100;
void setup() {
size(200,200);
smooth();
}
void draw() {
background(255);
// Draw the circle
stroke(0);
fill(175);
ellipse(circleX,circleY,50,50);
// Only move the circle when "going" is true
if (going) {
circleX = circleX + 1;
}
}
// Set going to true when the mouse is pressed!
void mousePressed() {
going = true;
processing Jul 29, 10, 7:58 p.m.
so i programmed my first piece of code in processing...but it took about 1.5 hours to code something i probably should have done in minutes. the problem i have is with setting with pixel precision arguments on the screen. i figured if the display window had a pixel grid of say 10px intervals, that would help tremendously. anyway, how do i solve spending hours figuring out where to place /*Draws body of creature */ in my code unless i have a grid...it just seemed like making educated guesses. which is definitely not efficient!
//sets size
size(320, 240);
smooth();
/*Draws head of creature */
stroke(0);
fill(240,0,0);
ellipseMode(CENTER);
ellipse(160,60,75,75);
/*Draws eyes of creature */
noStroke();
fill(0,255,15);
ellipseMode(CENTER);
ellipse(140,60,15,25);
ellipse(180,60,15,25);
/*Draws nose of creature */
noStroke();
fill(255);
ellipseMode(CENTER);
ellipse(160,70,15,15);
/*Draws mouth of creature */
stroke(0);
rectMode(CENTER);
rect(160,85,25,2);
println("you're done with the face");
/*Draws body of creature */
stroke(0);
fill(12,34,120);
rectMode(CENTER);
rect(160,133,28,70);
/*Draws line on top of head */
stroke(0);
line(125,23,193,23);
/*Draws right arm */
stroke(0);
line(174,120,200,160);
/*Draws left arm */
stroke(0);
line(146,120,117,160);
/*Draws left leg */
stroke(0);
line(146,169,136,220);
/*Draws right leg */
stroke(0);
line(174,169,185,220);
println("your done with creature");
OOP + FP=Scala Apr 27, 10, 10 p.m.
To continue our discussion on their respective benefits here comes Scala. Which Twitter apparently is deploying.
C++ and Scheme Apr 25, 10, 8:57 p.m.
New to programming. From my research so far it seems like an imperative programming language like C++ is widely popular; however, there's a lot to be said for functional programming languages that are more "stable" such as Lisp or Scheme. I guess it is necessary to learn both styles. Or can one stick to functional programming and be relevant outside academic circles. For you pros out there fill me in.
Symbian OS Vs iPhone OS Apr 25, 10, 1:29 a.m.
Symbian is open source and runs on the Qt framework. iPhone OS is closed as in all things Apple, plus the Qt framework supports Lisp programming language. Thoughts?
Steve Job's head Apr 23, 10, 1:32 a.m.
http://asktog.com/columns/082iPa…
interesting article on how steve jobs thinks from someone who worked with him.
User Interface of Xerox Star Apr 22, 10, 7:07 p.m.
&NR=1
This might be better than what we use today and it's from 1982!
Interaction Design V Interacitve Apr 20, 10, 8:09 p.m.
Any thoughts on the the future of design moving in a more interactive realm or more interaction design? I figure the latter is more lucrative and seems to be worthy of an investment to study.
TypeKit Apr 12, 10, 11:57 p.m.
Anyone use TypeKit? if so does the developer/designer pay the subscription fee? or does the user?
iPad predictions Apr 2, 10, 3:16 p.m.
So the iPad is coming to stores tomorrow. I wonder what the reception is going to be. I think it might surprise a few people...i believe that overall it's going to be a successful product because of its link to apps and especially the publishing world which can now create through social networking tools what I call the hyper-circulation of content...anyway, predictions anyone?
creative circle Mar 24, 10, 3:08 p.m.
they suck ass...i always get their stupid emails...yes i'm bitter!
design&technology parsons Mar 18, 10, 10 p.m.
anyone in the masters design and technology program at parsons in nyc? thinking of applying...what's it like? talked to someone at sva computer art program...it seemed pretty hardcore but it wasn't a focused program.
Syrup Mar 18, 10, 2:44 p.m.
Anyone worked or interned at Syrup? What's it like? I am thinking of doing an internship there, possibly in interactive. I am a print guy trying to make the switch...so I figure why not intern at Syrup?
Stockholm Mar 15, 10, 12:49 p.m.
Any one know of agencies in Stockholm that would be willing to offer an English speaker a creative opportunity? I like the design sensibility of Sweden. My website is below.
Working in Amsterdam Mar 12, 10, 6:25 p.m.
I would like to work in Amsterdam or Stockholm. I have a background in print, but I am trying to work at a place where I can transition into interactive and motion graphics without having those skills set yet (if it sounds awkward, I know). Currently, I don't have an exhaustive list of agencies in Amsterdam or Stockholm that are willing to hire an English speaker with a background in print. Any suggestions will be appreciated. My website:

