Question

How do I flip this shape across the y-axis using processing?

h_190527e | Processing 3.5.3 t Sketch Debug Tools Help sketch_190527e sketch 190527e float angleoffsetAnchor 13; vertex(cente

sketch 190527e beginShape(); fill (200,50,30,96); float centerX width/2; float centerY height/2; float angle map (i, 0, numRo

sketch 190527e | Processing 3.53 File Edit Sketch Debug Tools Help sketch 190527e vertex (centerx, centerY); float mappedStep

h_190527e | Processing 3.5.3 t Sketch Debug Tools Help sketch_190527e sketch 190527e float angleoffsetAnchor 13; vertex(centerx, centerY); float nappedStepsForLerp-map(steps, minstepsValue, maaStepsvalue, θ, 1); color lowSteps - color(9, 10, 200); color highSteps -color(29e, o, e); lor mappedDayColor lerpColor (Lowsteps, highSteps, mappedStepsForLerp); fill (mappedDayColor); float anchorPointx1 - centerx distanceoffsetAnchor sin(angle radians(angleoffsetAnchor)) float anchorPointy centerY distance0ffsetAnchor cos (angle radíans (angleOffsetAnchor)) 54 56float controlPointx - centerx + distanceoffset sin(angle); at controlPointy centerV + distanc e0ffset * cos (angle); float anchorPointx2 - centerx + distanceoffsetAnchor si float anchorPointyz - centerY distanceoffsetAnchor cos(angle radians(angleoffseta in(angle radians (angleoffsetánchor)); nchor)) 59 60 61 62 vertex (anchorPointxi, anchorPointyl); beztervertex(controlPointx, controlPointy, controlPointx, controlPointy, anchorPointxz, anchorPointy2) ertex(centerx, centery); 63 64 65 s6 endShape O There are 14 rows of data Win day rate 1ss . Hax day rate 1ss 19. 25 P A ors Console ype here to search
sketch 190527e beginShape(); fill (200,50,30,96); float centerX width/2; float centerY height/2; float angle map (i, 0, numRows, 0, Two_PI); 36 float distanceoffset map (steps,minStepsValue,maxStepsValue, 10,200); float distanceoffsetAnchor map (steps,minStepsValue, maxStepsValue, 10,100); float angleoffsetAnchor 13; 38 39 40 41 vertex(centerx, centerY); 43 float mappedStepsForLerp map(steps, minStepsValue, maxStepsValue, o, 1); color lowSteps color (0, 10, 200); color highSteps color (200, 0, 0); color mappedDayColor lerpColor (lowSteps, highSteps, mappedStepsForLerp); fill(mappedDayColor): 45 47 48 49 float ancho rPointx1 = centerx + distanceOffsetAnchor * sin(angle + radians (angleOffsetAnchor)); cet anchorPointyl centerY distanceoffsetAnchor cos (angle + radians (angleoffsetAnchor)); 52 53 flost controlPointx centerxdistanceoffsetsin(angle); 56 There are 14 rows of data Min day rate is: θ.8 Max day rate is: 19.0
sketch 190527e | Processing 3.53 File Edit Sketch Debug Tools Help sketch 190527e vertex (centerx, centerY); float mappedStepsForLerp map(steps, minStepsValue, maxStepsValue, 0, 1); color lowSteps color (0, 10, 200); color highSteps color (200, θ, 0); color mappedDayColor = lerpColor(lowsteps, highsteps, mappedStepsForLerp); fill (mappedDayColor); float anchorPointx1 centerx + distanceoffsetAnchor * sin(angle + radians (angleOffsetAnchor)); float anchorPointyl = centerV + distanceoffsetAnchor * cos (angle + radians (angleoffsetAnchor)); float controlPointx centerX distanceoffset sin(angle); float controlPointy centerY distanceOffset cos(angle) float anchorPointx2 center× + distanceOffsetAnchor * sin (angle- radian s (angleOffsetAnchor)); float anchorPointy2 centerYdistanceoffsetAnchor cos (angle radians (angle0ffsetAnchor)); vertex(anchorPointx1, anchorPointyl); beziervertex (controlPointx, controlPointy, controlPointx, controlPointy, anchorPointx2, anchorPointy2): vertex (centerX, centerY) ends There are 14 rows of data Min day rate is: θ.9 Max day rate is: 19. le Type here to search
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear student,

By just changing the i to -i in map function the processing application draws the shape in opposite direction so the output gets flipped

float angle=map(-i,0,numRows,0,TWO_PI);

As i dont have your complete code i cannot show you output.

If you have any doubt please comment below for clarification

Add a comment
Know the answer?
Add Answer to:
How do I flip this shape across the y-axis using processing? h_190527e | Processing 3.5.3 t Sketch Debug Too...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT