Thejesh GN avatar Thejesh GN committed e7c5a41

Added OOPS concepts

Comments (0)

Files changed (30)

examples/bouncing_ball_music/Ball.pde

+class Ball {
+
+  float r;   // radius
+  float x,y; // current location of the ball
+  float xspeed,yspeed; // speed
+  Minim out;
+  
+  // Constructor
+  Ball(float beginingRadius, Minim out) {
+    r = beginingRadius;
+    x = random(width);
+    y = random(height);
+    this.out = out;
+    xspeed = random( - 5,5);
+    yspeed = random( - 5,5);
+  }
+  
+  void bounce() {
+    x += xspeed; 
+    y += yspeed; 
+      AudioPlayer big = null;    
+    // Check horizontal edges
+    if (x > width || x < 0) {
+      xspeed *= - 1;
+      big = out.loadFile("small.mp3");
+      big.loop();
+      big.close();
+      println("------Bouncing--- ");
+    }
+    //Check vertical edges
+    if (y > height || y < 0) {
+      yspeed *= - 1;
+       //big = out.loadFile("small.mp3");
+      //big.play();
+      //big.close();
+    }
+  }
+  
+  // Draw the ball
+  void display() {
+    stroke(0);
+    fill(0,50);
+    ellipse(x,y,r*2,r*2);
+  }
+}

examples/bouncing_ball_music/bouncing_ball_music.pde

+import ddf.minim.*;
+import ddf.minim.signals.*;
+import ddf.minim.analysis.*;
+import ddf.minim.effects.*;
+
+// Learning Processing
+// Daniel Shiffman
+// http://www.learningprocessing.com
+
+// Example 10-2: Bouncing ball class
+
+// Two ball variables
+Ball ball1;
+Ball ball2;
+AudioOutput out;
+Minim minim;
+AudioPlayer small;
+AudioPlayer big;
+AudioPlayer p;
+void setup() {
+  size(400,400);
+  smooth();
+  minim = new Minim(this);
+ // out = minim.getLineOut(Minim.STEREO, 2048);
+    //big = minim.loadFile("small.mp3");
+    //small = minim.loadFile("big.mp3");    
+  // Initialize balls
+  ball1 = new Ball(64, minim);
+  ball2 = new Ball(32, minim);
+
+  
+}
+
+void draw() {
+  background(255);
+  
+  // Move and display balls
+  ball1.bounce();
+  ball2.bounce();
+  ball1.display();
+  ball2.display();
+  
+}
+
+
+void stop()
+{
+  big.close();
+  small.close();
+  out.close();
+  minim.stop();
+  
+  super.stop();
+}

examples/bouncing_ball_music/data/big.aup

+<?xml version="1.0" standalone="no" ?>
+<!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" >
+<project xmlns="http://audacity.sourceforge.net/xml/" projname="big_data" version="1.3.0" audacityversion="1.3.13-beta" sel0="0.4804664723" sel1="0.4804664723" vpos="176" h="0.0000000000" zoom="214.3750000000" rate="44100.0">
+	<tags>
+		<tag name="GENRE" value="Other"/>
+		<tag name="ARTIST" value="SoundBible.com"/>
+	</tags>
+	<wavetrack name="big" channel="0" linked="1" mute="0" solo="0" height="150" minimized="0" rate="44100" gain="1.0" pan="0.0">
+		<waveclip offset="0.00000000">
+			<sequence maxsamples="262144" sampleformat="262159" numsamples="21189">
+				<waveblock start="0">
+					<simpleblockfile filename="e0000908.au" len="21189" min="-0.953798" max="0.85386" rms="0.120258"/>
+				</waveblock>
+			</sequence>
+			<envelope numpoints="0"/>
+		</waveclip>
+	</wavetrack>
+	<wavetrack name="big" channel="1" linked="0" mute="0" solo="0" height="150" minimized="0" rate="44100" gain="1.0" pan="0.0">
+		<waveclip offset="0.00000000">
+			<sequence maxsamples="262144" sampleformat="262159" numsamples="21189">
+				<waveblock start="0">
+					<simpleblockfile filename="e00003a2.au" len="21189" min="-0.953798" max="0.85386" rms="0.120258"/>
+				</waveblock>
+			</sequence>
+			<envelope numpoints="0"/>
+		</waveclip>
+	</wavetrack>
+</project>
Add a comment to this file

examples/bouncing_ball_music/data/big.mp3

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/big1.mp3

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/big_data/e00/d00/e00003a2.au

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/big_data/e00/d00/e0000908.au

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/jingle.mp3

Binary file added.

examples/bouncing_ball_music/data/small.aup

+<?xml version="1.0" standalone="no" ?>
+<!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" >
+<project xmlns="http://audacity.sourceforge.net/xml/" projname="small_data" version="1.3.0" audacityversion="1.3.13-beta" sel0="0.3640816327" sel1="0.3640816327" vpos="0" h="0.0000000000" zoom="38.4529147982" rate="22050.0">
+	<tags>
+		<tag name="COMMENTS" value="SoundBible.com"/>
+		<tag name="ARTIST" value="Mike Koenig SoundBible.com"/>
+		<tag name="TITLE" value="Ship Bell"/>
+		<tag name="YEAR" value="2011"/>
+	</tags>
+	<wavetrack name="small" channel="0" linked="1" mute="0" solo="0" height="150" minimized="0" rate="22050" gain="1.0" pan="0.0">
+		<waveclip offset="0.00000000">
+			<sequence maxsamples="262144" sampleformat="262159" numsamples="20070">
+				<waveblock start="0">
+					<simpleblockfile filename="e00005cd.au" len="8028" min="-0.223856" max="0.217966" rms="0.023811"/>
+				</waveblock>
+				<waveblock start="8028">
+					<simpleblockfile filename="e0000f40.au" len="12042" min="0.0" max="0.003907" rms="0.001664"/>
+				</waveblock>
+			</sequence>
+			<envelope numpoints="0"/>
+		</waveclip>
+	</wavetrack>
+	<wavetrack name="small" channel="1" linked="0" mute="0" solo="0" height="150" minimized="0" rate="22050" gain="1.0" pan="0.0">
+		<waveclip offset="0.00000000">
+			<sequence maxsamples="262144" sampleformat="262159" numsamples="20070">
+				<waveblock start="0">
+					<simpleblockfile filename="e0000173.au" len="8028" min="-0.223856" max="0.217966" rms="0.023811"/>
+				</waveblock>
+				<waveblock start="8028">
+					<simpleblockfile filename="e0000c70.au" len="12042" min="0.0" max="0.003907" rms="0.001664"/>
+				</waveblock>
+			</sequence>
+			<envelope numpoints="0"/>
+		</waveclip>
+	</wavetrack>
+</project>
Add a comment to this file

examples/bouncing_ball_music/data/small.mp3

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/small1.mp3

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/small_data/e00/d00/e0000173.au

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/small_data/e00/d00/e00005cd.au

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/small_data/e00/d00/e0000c70.au

Binary file added.

Add a comment to this file

examples/bouncing_ball_music/data/small_data/e00/d00/e0000f40.au

Binary file added.

examples/bus/bus.pde

+int pixel_move = 1;
+void setup(){
+  size(800,400);
+  frameRate(10);
+}
+
+void draw(){
+  translate(100+pixel_move,100);
+ background(100,100,100); 
+ fill(255,0,0);
+ rect(0,0,100,40);
+  fill(0,0,0);
+  ellipse(20,40,25,25);
+  ellipse(60,40,25,25);
+  pixel_move = pixel_move+1;
+}

examples/cars/cars.pde

+class car{
+
+	//properties
+	String my_make;
+	String my_num;
+	int my_curPosx;
+	int my_curPosY;
+	int my_speed;
+
+
+
+
+	//building our car
+	car(String make, String num,  int curX, int curY ){
+		 my_make = make;
+		 my_num = num;
+		 my_curPosx = curX;
+		 my_curPosY = curY;
+	}
+
+	
+	void drive(int speed){
+          my_speed= speed;
+          my_curPosx  = my_curPosx  + my_speed;
+            if (my_curPosx  > width) {
+              my_curPosx  = 0;
+            }
+        }
+
+	
+
+	void stop(){
+		my_speed = 0;
+	}
+
+
+        void display(){
+              stroke(0);
+              fill(0,0,0);
+              rectMode(CENTER);
+              rect(my_curPosx,my_curPosY,20,10);
+        }
+
+}
+
+
+
+/*---------------------------Lets race-----------------------------------------*/
+
+car thejsCar = null;
+car batmansCar = null;
+void setup(){
+  size(500,600);
+  //lets construct a new maruthi car for me
+  thejsCar = new car("Maruthi", "KA51", 10,10);
+  //in the mean time @ batmans cave	 
+  batmansCar = new car("BatMobile","1",10,200);
+}
+
+void draw(){
+   background(255);
+   //let me start driving it
+   thejsCar.drive(10);
+   //let me display the car on screen
+   thejsCar.display();
+   //batman is faster than me
+   batmansCar.drive(30);
+  //let me display batmans car on screen
+  batmansCar.display();
+}

presentation/module3/0.html

 <div id="header-wrap">
 	<div id="header-container">
 		<div id="header">
-			<h2>Processing 101 </h2><h1>Programming with Processing</h1>
+			<h2>Processing 101 </h2><h1>Advanced&nbsp;&nbsp; Processing</h1>
 			<ul>
 				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
 				<li><a href="./1.html">Next&nbsp;&gt;</a></li>

presentation/module3/1.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./0.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./2.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+				<li>OOP - Object Oriented Programming.</li>
+				<li>Concept of an Object</li>
+				<li>Everything is an Object in this world</li>
+				<li>For example car, lets define a car object</li>
+				<li>It has some properties and some actions</li>
+				<li>Properities for example: make, num, color, height, width, curPosx, curPosY, speed etc</li>
+				<li>Actions like : drive, reverse, stop, park etc</li>
+
+			</ul>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/2.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./1.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./3.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+			<ul>
+				<li>So how are we going to capture this in Processing</li>
+				<li>The characterestics of an Object are captured in a class</li>
+				<li>Properties become class properties (variables)</li>
+				<li>Actions become methods of the class</li>
+				<li>Lets apply it to our car</li>
+			</ul>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/3.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./2.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./4.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+		<ul><li><pre><code>
+class car{
+
+	//properties
+	String my_make;
+	String my_num;
+	int mu_curPosx;
+	int my_curPosY;
+	int my_speed;
+
+
+	void drive(){
+		//calling this will make the car move
+
+	}
+
+	void stop(){
+		//calling this will stop the car
+
+	}
+
+
+}
+</code></pre></li>
+				<li> There should be a way to construct car right?</li>
+			</ul>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/4.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./3.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./5.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+		<ul>
+			<li> Yes, by using constructor method</li>
+			<li> The name of it will be same as class name</li>
+		</ul>
+<pre>
+<code>
+class car{
+
+	//properties
+	String my_make;
+	String my_num;
+	int my_curPosx;
+	int my_curPosY;
+	int my_speed;
+
+
+
+
+//building our car
+car(String make, String num,  int curX, int curY ){
+	 my_make = make;
+	 my_num = num;
+	 my_curPosx = curX;
+	 my_curPosY = curY;
+}
+
+/*........other methods ....*/
+void drive(){
+	//calling this will make the car move
+
+}
+
+void stop(){
+	//calling this will stop the car
+
+}
+
+}
+</code>
+</pre>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/5.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./4.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./6.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+		<ul>
+			<li>Minimalistic car class looks like</li>
+		</ul>
+<pre><small>
+<code>
+class car{
+
+	//properties
+	String my_make;
+	String my_num;
+	int my_curPosx;
+	int my_curPosY;
+	int my_speed;
+
+	//building our car
+	car(String make, String num,  int curX, int curY ){
+		 my_make = make;
+		 my_num = num;
+		 my_curPosx = curX;
+		 my_curPosY = curY;
+	}
+
+	
+	void drive(int speed){
+          my_speed= speed;
+          my_curPosx  = my_curPosx  + my_speed;
+            if (my_curPosx  > width) {
+              my_curPosx  = 0;
+            }
+        }
+
+	
+
+	void stop(){
+		my_speed = 0;
+	}
+
+
+        void display(){
+              stroke(0);
+              fill(0,0,0);
+              rectMode(CENTER);
+              rect(my_curPosx,my_curPosY,20,10);
+        }
+
+}
+</code>
+</small></pre>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/6.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./5.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./7.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+		<ul>
+			<li>Now that we have cars, lets race</li>
+		<li><pre><small><code>
+car thejsCar = null;
+car batmansCar = null;
+void setup(){
+  size(500,600);
+  //lets construct a new maruthi car for me
+  thejsCar = new car("Maruthi", "KA51", 10,10);
+  //in the mean time @ batmans cave	 
+  batmansCar = new car("BatMobile","1",10,200);
+}
+
+void draw(){
+   background(255);
+   //let me start driving it
+   thejsCar.drive(10);
+   //let me display the car on screen
+   thejsCar.display();
+   //batman is faster than me
+   batmansCar.drive(30);
+  //let me display batmans car on screen
+  batmansCar.display();
+}</code>
+</small></pre>
+		</ul>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

presentation/module3/7.html

+<html>
+<head>
+<title>Processing 101 - Introduction</title>
+<link rel="stylesheet" href="../media/style.css" /> 
+<link rel="stylesheet" href="../media/bebas/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/TitilliumText/stylesheet.css" type="text/css" charset="utf-8">
+<link rel="stylesheet" href="../media/main.css" /> 
+<link rel="stylesheet" href="../media/ie6.css" /> 
+</head>
+<body>
+<div id="header-wrap">
+	<div id="header-container">
+		<div id="header">
+			<h2>Processing 101 </h2><h1>OOP</h1>
+			<ul>
+				<li><a href="./6.html">&lt;&nbsp;Previous</a></li>
+				<li><a href="../index.html">&nbsp;Home&nbsp;</a></li>
+				<li><a href="./8.html">Next&nbsp;&gt;</a></li>
+			</ul>
+		</div>
+			
+	</div>
+</div>
+
+<div id="ie6-container-wrap">
+	<div id="container">
+		<div id="content" class="content">
+		<ul>
+			<li>Let us improve the conditions</li>
+			<li>Can you display the name of car?</li>
+			<li>Can you create a car with a specific color?</li>
+			<li>Can you stop the cars after one loop?</li>
+			<li>Can you capture the winning frame as a picture with the name of winner?</li>
+		</ul>
+		</div>
+	</div>
+</div>
+
+<div id="footer-wrap">
+	<div id="footer-container">
+		<div id="footer">
+			<div id="credits">
+				<a href="http://thejeshgn.com/"><font color="#000">Thejesh</font>&nbsp;<font color="#83BE32">GN</font></a>
+			</div>
+			<ul>
+				<li><a href="http://thejeshgn.com/teaching/processing-101/">Course</a></li>
+				<li><a href="http://code.thejeshgn.com/processing101/">Code</a></li>	
+				<li><a href="http://www.delicious.com/gnthej/processing101/">Links</a></li>	
+				<li><a href="http://thejeshgn.com/contact/">Contact</a></li>	
+
+			</ul>
+		</div>
+	</div>
+</div>
+</body>
+</html>

project/check_pmousex/check_pmousex.pde

+
+void setup(){
+ size(500,500); 
+ background(255);
+ frameRate(1);
+
+}
+
+void draw()
+{
+}
+
+void mouseClicked() {
+    line(mouseX, mouseY, pmouseX, pmouseY); 
+    println(mouseY);    
+    println(pmouseY);
+    
+}
Add a comment to this file

project/check_pmousex/data/CharterBT-BoldItalic-48.vlw

Binary file added.

Add a comment to this file

project/check_pmousex/data/CharterBT-Roman-48.vlw

Binary file added.

Add a comment to this file

project/sketch_aug09b/myflower.jpg

Added
New image

project/sketch_aug09b/sketch_aug09b.pde

+size(600, 400);  
+background(100);  
+smooth();
+noStroke(); 
+pushMatrix();
+translate(100, 100);  
+for(int i = 0; i < 7; i++) {    
+//fill(195, 200, 250, 60);    
+fill(245,205,220,80);
+pushMatrix();    
+// rotate each petal 62 degrees  = 360/5 loops  
+rotate(radians(i*360/7));    
+ellipse(0,0,100,20);    
+popMatrix();  
+}  
+fill(244,0,0);
+ellipse(0,0,18,18);
+popMatrix();
+fill(244,0,0);
+text("Anju",20,20);
+save("myflower.jpg");
+//-------------------
+pushMatrix();
+translate(200,200);
+//-----------A
+pushMatrix();    
+rotate(radians(360/7));    
+ellipse(0,0,100,20);    
+rotate(radians(360/5));    
+ellipse(20,20,100,20);    
+popMatrix();
+
+popMatrix();
+//----------------------
+
+
+//----------N
+pushMatrix();    
+rotate(radians(360/7));    
+ellipse(0,0,100,20);    
+rotate(radians(360/5));    
+ellipse(20,20,100,20);    
+rotate(radians(360/5));    
+ellipse(-20,-20,100,20);    
+
+popMatrix();
+
+
+
+
+//--------------------------
+
+popMatrix();
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.