I think missy_loley is looking for the x,y positions of the heart curve. On
this page there are many methods to draw a heart and different formulas to make one. I've just taken one that I liked and implemented it in Processing, see the code below. You can replace the two points by your little heart shape and use the (
x,y) and the (
-x,y). That way you have a big heart shape made out of little hearts! ;-)
- void setup() {
- size(600,600);
- smooth();
- strokeWeight(5);
- stroke(255,0,0);
- }
- void draw() {
- translate(width/2,3*height/4);
- background(255);
- for (int i=0; i<61; i++) {
- float x = 0.25 * (-pow(i,2) + 40*i + 1200)*sin((PI*i)/180);
- float y = -0.25 * (-pow(i,2) + 40*i + 1200)*cos((PI*i)/180);
- point(x,y); // use these to place your little hearts
- point(-x,y); // use these to place your little hearts
- }
- }
Also check out the following code. I've used text and shifting colors to make a colorful heart-of-hearts
- void setup() {
- size(600,600);
- textFont(createFont("SansSerif",35));
- colorMode(HSB,360,100,100);
- }
- void draw() {
- translate(width/2,3*height/4);
- background(180,0,75);
- for (int i=0; i<61; i+=4) {
- float x = 0.25 * (-pow(i,2) + 40*i + 1200)*sin((PI*i)/180);
- float y = -0.25 * (-pow(i,2) + 40*i + 1200)*cos((PI*i)/180);
- fill((x +frameCount) % 360,100,100);
- text("♥",x,y);
- text("♥",-x,y);
- }
- }