Questions tagged [triangle]

Triangles are simple, yet fundamental building blocks of many different mathematical fields including trigonometry and geometry.

There are 6 types of triangles including:

  • Equilateral

    All edges are the same length.

    enter image description here

  • Isosceles

    Two edges are the same length.

    enter image description here

  • Scalene

    All edges are different lengths.

    enter image description here

  • Right

    One angle with value of 90 degrees.

    enter image description here

  • Obtuse

    One angle with value greater than 90 degrees.

    enter image description here

  • Acute

    All angles with value less than 90 degrees.

    enter image description here

126 questions
0
votes
0 answers

Build problem when installing "triangle" & "glumpy" (on Windows)

I am struggling with installing the package triangle and hence glumpy for Python3.10 on Windows10. I managed to install a bunch of packages without any problem. However, when it comes to triangle I do get the following error message. Somehow there…
0
votes
2 answers

Prolog - get the greatest perimeter of triangles drawn with coordinates

The name and coordinates of a point in the plane can be given as points (A, X, Y). Create a database by defining 10 points [such as point(a, 13, 47)] in accordance with this relationship in Prolog language. Since three of these points will define a…
0
votes
1 answer

Triangle mesh generation of 3D objects using Python

Hey everyone I'm pretty new to graphics programming and I want some guidance or working samples, I want to make any 3D objects but for starters I want to make a 3D cube using triangle mesh with given coordinates via python, and export all the mesh…
0
votes
2 answers

Coloring half of a triangle in CSS

I need to fill the top-half of the triangle with black like in the picture (#d3 is the triangle div): Here's HTML code: #d1 { background: #191919; height: 300px; width: 400px; display: grid; place-content: center; position:…
0
votes
0 answers

Program prints a new line before entering the loop the \n is

i've done this code to print a triangle after a side is scanned. It does show me the triangle but it prints me a new line right after i add a side which is not meant to be there. Here is my code and i'll also add my output, i've marked the new line…
Tara
  • 1
  • 1
0
votes
1 answer

Tkinter drawing triangle with three input length

I want to draw triangle by input length. So I made three entry that I can input data. But it says "TypeError: buttonclick1() missing 3 required positional arguments: 'a', 'b', and 'c'" Can you help me? I want to make a triangle by three input length…
John
  • 11
  • 1
0
votes
1 answer

How do I make my rotating polygon element (svg) to be responsive?

I am trying to make my triangle rotate around the circle for my college assignment, but I have a problem making my triangle responsive. The blue-purple triangle is supposed to be rotating inside the orange square box and the size should be…
April K
  • 1
  • 2
0
votes
0 answers

Finding closest triangle from a point using octree

I have a list of triangles in 3D space and a point described with (x,y,z) coordinates. I am writing a method for returning the closest triangle to that point. The naive implementation I wrote initially was to loop through all the triangles, check…
0
votes
2 answers

Creating a parameterized constructor to determine upper bound for randomized side lengths

Im working on a project for class and we have to create a Triangle class that will hold the lengths of each side of the triangle. I created a default constructor that gives each side of the triangle a random length no more than 6. Were asked to…
0
votes
2 answers

How to create soil texture ternary plot?

I have a data frame with soil texture information and I want to create a soil texture plot similar to this. How can I do this with: different colors per area and labels for classes within triangles like this ? example data: area <-…
geo_dd
  • 283
  • 1
  • 5
  • 22
0
votes
2 answers

How to convert a bar chart into a triangle shaped chart using Chart JS?

How to convert a bar chart into a triangle shaped chart using Chart JS ? For eg: Sample Bar Chart : How to convert it into triangles instead of bars ? var ctx = document.getElementById('myChart'); var myChart = new Chart(ctx, { type: 'bar', …
0
votes
1 answer

Recreate Parabolic Triangle gif using Processing

I want to recreate the Parabolic Triangle using Processing: I've already got the "base" code figured out I think. What I need now is to cycle through my code to get the correct number of triangles/lines. I'm using n to determine how many triangles…
0
votes
0 answers

Triangle Drawing not repeating for recursion code

I am writing a recursion code for my triangle drawing. For some reason, it wont do the recursion, but it will do the base drawing. Would like some help in figuring out why my code isn't repeating. Also, if someone could help me figure out how to…
0
votes
1 answer

Trying to make a triangle that can rotate and move by applying the same transformations to all three points

I am trying to make boids simulation and for that I need triangles that move and rotate. I made a Triangle and a Boid struct. struct Triangle { olc::vf2d p1 = { 0.0f, 0.0f }; olc::vf2d p2 = { -5.0f, 10.0f }; olc::vf2d p3 = { 5.0f, …
Apple_Banana
  • 131
  • 6
0
votes
3 answers

How to print pattern where each subsequent column is squared?

Here is the pattern I am trying to print: 1 2 4 3 9 27 4 16 64 256 5 25 125 625 3125 Here is what I have so far, and I am stuck at this point. for rows in range(1,5+1): for columns in range(rows): columns= (rows)**rows …
marabi
  • 3
  • 2
1 2 3
8 9