Thanks for your reply 🙂. as mentioned in a previous comment, It would be very easy to track the coordinates for a shape with vertices like a star or a rhombus but I don't know how to calculate the largest and smallest coordinates for a shape with curves like a heart yet. Thanks 🙂
Here it is easy to apply your method of finding the largest and smallest x, y co-ordinates to compute the bounding box. But, In case of a heart shape, cubic Bezier curves are used as in this code:
I don't know how to find out the highest and lowest x,y values to compute the bounding box. I've started reading the site suggested by @nottesla
in their reply. It would be helpful to get your suggestion to this problem.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @maxarias ,
Thanks for your reply 🙂. as mentioned in a previous comment, It would be very easy to track the coordinates for a shape with vertices like a star or a rhombus but I don't know how to calculate the largest and smallest coordinates for a shape with curves like a heart yet. Thanks 🙂
Can you share what you're using the draw the shapes? It might be easier to help you if we can see how you're doing it.
Hi @maxarias ,
I draw a triangle similar to this code:
Here it is easy to apply your method of finding the largest and smallest x, y co-ordinates to compute the bounding box. But, In case of a heart shape, cubic Bezier curves are used as in this code:
I don't know how to find out the highest and lowest x,y values to compute the bounding box. I've started reading the site suggested by @nottesla in their reply. It would be helpful to get your suggestion to this problem.