# Simplest method for pshape triangle with rounded corners?

**URL:** <https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563>\
**Category:** Coding Questions\
**Created:** [February 20, 2019, 12:37pm UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563 "2019-02-20T12:37:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mala](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mala](https://discourse.processing.org/u/mala)\
**Post date:** [February 20, 2019, 12:37pm UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563/1 "2019-02-20T12:37:35Z")

</div>

Has anyone got any suggestions for this ?  
It can be drawn point by point rather tediously with vertex and beziervertex, but is there maybe an easier method ?

Thanks for any suggestions.  
mala

---

<div class="post-metadata">

**Author:** ![hotfooted](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hotfooted/32/3670_2.png) [@hotfooted](https://discourse.processing.org/u/hotfooted)\
**Post date:** [February 21, 2019, 1:32am UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563/2 "2019-02-21T01:32:59Z")

</div>

probably the simplest is create an svg of the triangle you want and import it.

> **[PShape / Reference](https://processing.org/reference/PShape.html)**
>
> Datatype for storing shapes. Before a shape is used, it must be loaded with the loadShape() or created with the createShape(). The shape() function is used to draw the shape to th…

> The **loadShape()** function supports SVG files created with Inkscape and Adobe Illustrator. It is not a full SVG implementation, but offers some straightforward support for handling vector data.

---

<div class="post-metadata">

**Author:** ![mala](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mala](https://discourse.processing.org/u/mala)\
**Post date:** [February 21, 2019, 9:09am UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563/3 "2019-02-21T09:09:27Z")

</div>

Thanks, yes was aware of that option.  
Had some issues with Inkscape on OSX in the past, so currently SVG creation is not an option for me.  
Will look again and see if Inkscape plays nice now though,would be useful for the future.

Anyway, not to worry, I got there with a bit of maths and the vertex method.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 22, 2019, 6:15pm UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563/4 "2019-02-22T18:15:02Z")

</div>

> [@mala](#):
>
> I got there with a bit of maths and the vertex method

Glad you solved it!

Would you be willing to share your solution – for any future users are looking for rounded triangles?

---

<div class="post-metadata">

**Author:** ![mala](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mala](https://discourse.processing.org/u/mala)\
**Post date:** [May 19, 2019, 10:11am UTC](https://discourse.processing.org/t/simplest-method-for-pshape-triangle-with-rounded-corners/8563/5 "2019-05-19T10:11:23Z")

</div>

Apologies,rather late reply!  
The method i used was not really a coded solution, I just got one corner to look correct by trial & error then took the distance of the placed vertex from the original triangle corner and used the same distance on the other 2 corners.

I have since though started using Krita and exporting svg files… a much nicer solution.
