# \[SOLVED\] Simple question: making a triangle in groimp

**URL:** <https://fspm.discourse.group/t/solved-simple-question-making-a-triangle-in-groimp/303>\
**Category:** GroIMP\
**Created:** [August 30, 2024, 8:43pm UTC](https://fspm.discourse.group/t/solved-simple-question-making-a-triangle-in-groimp/303 "2024-08-30T20:43:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michele\_Butturini](https://dub1.discourse-cdn.com/flex005/user_avatar/fspm.discourse.group/michele_butturini/32/14_2.png) [@Michele\_Butturini](https://fspm.discourse.group/u/Michele_Butturini)\
**Post date:** [August 30, 2024, 8:43pm UTC](https://fspm.discourse.group/t/solved-simple-question-making-a-triangle-in-groimp/303/1 "2024-08-30T20:43:46Z")

</div>

Hi,  
very simple (stupid?) question: can you make triangles (instead of rectangles) with in Groimp? If yes how?

Cause I saw there is the Class Triangle but when I write Triangle() I get error

> **[Triangle (GroIMP 2.1.4 API)](https://javadoc.grogra.de/imp2d/de/grogra/imp2d/objects/Triangle.html)**
>
> declaration: module: imp2d, package: de.grogra.imp2d.objects, class: Triangle

---

<div class="post-metadata">

**Author:** ![gaetanH](https://avatars.discourse-cdn.com/v4/letter/g/edb3f5/32.png) [@gaetanH](https://fspm.discourse.group/u/gaetanH)\
**Post date:** [September 2, 2024, 1:33pm UTC](https://fspm.discourse.group/t/solved-simple-question-making-a-triangle-in-groimp/303/2 "2024-09-02T13:33:19Z")

</div>

Hi Michele,

It is a bit confusing but in groimp there is a 2d view and a 3d view. You can only use 2d objects in the 2d view and only 3d objects in the 3d view.  
This is why when you try to open the **2d graph** (which can be used with 3d objects) by opening the **2d view** it fails and throw an error.

All objects defined in imp2d are objects for the 2d view. So it is possible to use the class de.grogra.imp2d.objects.Triangle but only in a 2d context.  
In a 2d context you can simply create a scene with a Triangle with  
init()[Axiom ==\> Triangle();]  
But I don’t know what is it useful for as in 2d most shapes are not even displayed.

To my knowledge there is no 3d tetrahedron or triangle boxes built in for the 3d view.

Best,  
Gaetan

---

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [September 2, 2024, 1:56pm UTC](https://fspm.discourse.group/t/solved-simple-question-making-a-triangle-in-groimp/303/3 "2024-09-02T13:56:06Z")

</div>

I see, thank you for your answer!  
I think it could be a useful feature to have triangles for the 3d view
