Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
shadowgun
shadowgun's Profile
2
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
add new record in XML
[2 Replies]
10-Nov-2012 10:57 AM
Forum:
Core Library Questions
I have an XML and I would like to add a new entry
<?xml version="1.0"?>
<data>
<result id="0" steps="1">name1</result>
<result id="1" steps="2">name2</result>
<result id="2" steps="3">name3</result>
<result id="3" steps="4">name4</result>
</data>
how add new record in the file?
<?xml version="1.0"?>
<data>
<result id="0" steps="1">name1</result>
<result id="1" steps="2">name2</result>
<result id="2" steps="3">name3</result>
<result id="3" steps="4">name4</result>
//this new record
<result id="4" steps="2">name5</result>
</data>
please help
How to rotate the rect
[2 Replies]
05-Oct-2012 10:28 AM
Forum:
Programming Questions
Good day
Do not have any idea. How to rotate a rect in the cycle.
float a;
float fx,fy;
void setup() {
size(640, 550);
smooth();
fill(255);
rectMode(CENTER);
}
void draw() {
background(102);
translate(320, 275);
a = atan2(mouseY-height/2, mouseX-width/2);
rotate(a);
rectDraw(250,50,0.45,0);
}
void rectDraw(int r, int s, float c, float d)
{
for(float i=0; i<2*PI; i=i+c)
{
fx = r*cos(i);
fy = r*sin(i);
//This is not work everything becomes chaotic
//translate(fx, fy);
//rotate(i)
rect(fx,fy,s,s);
}
}
Please help.
«Prev
Next »
Moderate user : shadowgun
Forum