// ************************************************ void getColourFromList(int idx,OpenMesh::Vec3uc& outColour) { OpenMesh::Vec3uc purple(92,75,81); OpenMesh::Vec3uc lightBlue(140,190,178); OpenMesh::Vec3uc lightYellow(242,235,191); OpenMesh::Vec3uc lightOrange(243,181,98); OpenMesh::Vec3uc lightPink(240,96,96); OpenMesh::Vec3uc otherBlue(95,172,190); outColour = otherBlue; if (idx == 1 ) outColour = purple; if (idx == 2 ) outColour = lightBlue; if (idx == 3 ) outColour = lightYellow; if (idx == 4 ) outColour = lightOrange; if (idx == 5 ) outColour = lightPink; if (idx == 6 ) outColour = otherBlue; }
//-------------------------------------------------------------- void ofApp::setup(){ numSmallCircles = 41; //11 purple, 7 blue, 5 top right, 11 sleave, 7 but, 14 bottom grabbed = false; ofColor purple (161, 99, 128); ofColor pink (214, 73, 89); // 1 pink ofColor lightPink (147,131,17); //2 light pink ofColor yellow (212,179,14); //3 yellow ofColor black (44,53,71); //4 middle black ofColor blue (47,96,137);//5 blue ofColor green (28,124,92);//6 green ofColor orange (228,95,79);//7 orange bottom circles ofColor moreYellow (204, 155, 82); ofColor orangeLighter (232,105,92); ofColor darkBlue (38,81,126); //purple circle positions 0-11 circlePositions.push_back(ofPoint(436, 342)); //0 circlePositions.push_back(ofPoint(446, 358)); //1 circlePositions.push_back(ofPoint(438, 385)); //2 circlePositions.push_back(ofPoint(414,352)); //3 circlePositions.push_back(ofPoint(429, 369)); //4 circlePositions.push_back(ofPoint(423, 385)); //5 circlePositions.push_back(ofPoint(425, 395)); //6 circlePositions.push_back(ofPoint(402,337)); //7 circlePositions.push_back(ofPoint(403, 376)); //8 circlePositions.push_back(ofPoint(389, 392)); //9 circlePositions.push_back(ofPoint(381, 348)); //10 circlePositions.push_back(ofPoint(382, 365)); //11 for(int i=0; i<11; i++){ CirclesWoman tempCircle; smallCircles.push_back(tempCircle); } int width = ofRandom(20,30); int height = ofRandom(10,20); smallCircles[1].setup(width, height, pink, lightPink, black, circlePositions[1]); smallCircles[2].setup(width, height, purple, yellow, black, circlePositions[2]); smallCircles[3].setup(width, height, yellow, pink, black, circlePositions[3]); smallCircles[4].setup(width, height, pink, lightPink, black, circlePositions[4]); smallCircles[5].setup(width, height, purple, yellow, black, circlePositions[5]); smallCircles[6].setup(width, height, yellow, lightPink, black, circlePositions[6]); smallCircles[7].setup(width, height, pink, yellow, yellow, circlePositions[7]); smallCircles[8].setup(width, height, pink, yellow, black, circlePositions[8]); smallCircles[9].setup(width, height, blue, green, green, circlePositions[9]); smallCircles[10].setup(width, height, pink, purple, black, circlePositions[10]); smallCircles[11].setup(width, height, purple, yellow, black, circlePositions[11]); //blue circles for(int i=11; i<19; i++){ CirclesWoman tempBlueCircle; tempBlueCircle.randomSetup("blue"); smallCircles.push_back(tempBlueCircle); } // setup(int _width, int _height, ofColor color1, ofColor color2, ofColor color3 , ofPoint _position) for(int i=19; i<26; i++){ CirclesWoman tempButtCircle; tempButtCircle.randomSetup("butt"); smallCircles.push_back(tempButtCircle); } for(int i=26; i<41; i++){ CirclesWoman tempBottomCircle; smallCircles.push_back(tempBottomCircle); } smallCircles[26].setup(13.33, 9.33, orange, moreYellow, moreYellow, ofPoint(447,727)); smallCircles[27].setup(17.33, 18.833, orange, moreYellow, moreYellow, ofPoint(447,738.5)); smallCircles[28].setup(17.33, 15.75, orange, moreYellow, green, ofPoint(450,753)); smallCircles[29].setup(16, 11.875, orange, moreYellow, moreYellow, ofPoint(442,769)); smallCircles[30].setup(17.33, 14.542, orange, moreYellow, green, ofPoint(429,722)); smallCircles[31].setup(18.267, 14.751, orange, moreYellow, moreYellow, ofPoint(430,733)); smallCircles[32].setup(24.99, 18.17, orange, orangeLighter, black, ofPoint(430,748)); smallCircles[33].setup(19.313, 15.34, darkBlue, darkBlue, black, ofPoint(418,762.566)); smallCircles[34].setup(18.3, 13.602, orange, moreYellow, moreYellow, ofPoint(415.33,720)); smallCircles[35].setup(23.54, 16.605, orange, orangeLighter, black, ofPoint(408,736)); smallCircles[36].setup(22, 14, darkBlue, darkBlue, black, ofPoint(389,722)); smallCircles[37].setup(21, 14, orange, yellow, yellow, ofPoint(385,740)); smallCircles[38].setup(21, 14, orange, orangeLighter, black, ofPoint(395,750)); smallCircles[39].setup(21, 18, orange, moreYellow, moreYellow, ofPoint(382,763)); smallCircles[40].setup(21, 17, orange, moreYellow, moreYellow, ofPoint(404,765)); //<-------------- squiggly lines dress ----------------> numLines = 30; int startingX = 332; int endingX = 500; int interval = (endingX-startingX)/numLines; for(int i=0; i<numLines; i++){ SquigglyLine tempSquiggle; tempSquiggle.setup(startingX + interval*i); lines.push_back(tempSquiggle); } //<-------------- images ----------------> arm.loadImage("arm.png"); greenCircle.loadImage("green_circle.png"); orangeBackground.loadImage("orange_background.jpg"); heads.loadImage("heads.png"); spiralBackground.loadImage("under_spirals.png"); background.loadImage("background.jpg"); man.loadImage("man.png"); //<-------------- little squares dress ----------------> numLittleSquares = 120; for(int i=0; i<numLittleSquares; i++){ LittleSquares tempSquare; tempSquare.setup(); dressSquares.push_back(tempSquare); } //<-------------- big circles dress ----------------> numBigCirclesDress = 10; // for(int i=0; i<numBigCirclesDress; i++){ // bigCirclesDress tempBigCircle; // tempBigCircle.setup(); // bigCircles.push_back(tempBigCircle); // // // } // for(int i=0; i<numBigCirclesDress; i++){ bigCirclesDress tempBigCircle; bigCircles.push_back(tempBigCircle); } bigCircles[0].setupFixed(ofPoint(411,488),22,16); bigCircles[1].setupFixed(ofPoint(412,637),20,16); bigCircles[2].setupFixed(ofPoint(457,330),22,14); bigCircles[3].setupFixed(ofPoint(417,543),21,15); bigCircles[4].setupFixed(ofPoint(342,500),18,11); bigCircles[5].setupFixed(ofPoint(377,519),18,13); bigCircles[6].setupFixed(ofPoint(449,548),22,16); bigCircles[7].setupFixed(ofPoint(388,590),21,15); bigCircles[8].setupFixed(ofPoint(392,649),15,11); bigCircles[9].setupFixed(ofPoint(465,726),19,15); //<-------------- spirals ----------------> numSpirals = 12; for(int i=0; i<numSpirals; i++){ spiral tempSpiral; spirals.push_back(tempSpiral); //spirals[i].setupRandom(); } spirals[0].setup(ofPoint(495,373), 35,35, 4); spirals[1].setup(ofPoint(537,355), 52,52, 4); spirals[2].setup(ofPoint(560, 506), 40, 38, 4); spirals[3].setup(ofPoint(499, 473), 60, 55, 5); spirals[4].setup(ofPoint(520, 438), 35, 32, 4); spirals[5].setup(ofPoint(553, 414), 29, 29, 3); spirals[6].setup(ofPoint(483, 598), 50, 45, 4); spirals[7].setup(ofPoint(540, 619), 40, 35, 4); spirals[8].setup(ofPoint(595, 554), 34, 32, 3); spirals[9].setup(ofPoint(479, 414), 45, 40, 4); spirals[10].setup(ofPoint(534, 537), 54, 44, 6); spirals[11].setup(ofPoint(490, 530), 36, 31, 4); // int posX = 495; // float radius = 35; // for(var i=0; i<numSpirals; i++){ // if(posX < 650){ // posX += numSpirals[i-1].radius/2 // } // spirals[i].setup(ofPoint()); // } }