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
1
vote
1 answer

How to parse through a list effectively for a Number Triangle Problem?

I have to find the largest sum down a triangle of numbers where 1 is the first row, the second row is 3,2, the third is 4,5,6 and so on for n rows where every other row is reversed. The path only goes from top to bottom and does not go sideways or…
Veronika
  • 29
  • 1
1
vote
0 answers

Drawing triangle on the console

I have been trying to draw triangle by specific coordinates on java. I kinda drew it but there is a problem. I put the output and my code down there. As you can see, sides of the triangle are too long, I need to limit them. Can you guys help me out…
1
vote
1 answer

How to print several triangles in one line (HASKELL)

I have this self-defined IO() Triangle, which has each row of a triangle as an element in a list: import Data.List ( intersperse ) type Triangle = Char -> Int -> [String] centeredTriangle :: Triangle centeredTriangle c n = [replicate (n-i) ' ' ++…
Mampenda
  • 661
  • 4
  • 21
1
vote
1 answer

Center a triangle (HASKELL)

Inspired by this question, I have made this code which prints out triangles: type TriangleMaker = Char -> Int -> [String] topLeftTriangle :: TriangleMaker topLeftTriangle c n = [replicate i c | i <- [1 .. n]] centeredTriangle ::…
Mampenda
  • 661
  • 4
  • 21
1
vote
3 answers

How to triangulate a polygon with and without vertices and holes inside - delaunay triangulation possible?

I got the following problem: I'm working on an algorithm and the output will be an arbitrary polygon. The polygon can be concave, have holes in it and also have vertices with edges that have an angle of 180 degree. I need to triangulate said polygon…
Reskareth
  • 47
  • 4
1
vote
1 answer

How to determine the normal of the triangles faces of tetrahedral?

Tetrahedral is given by the points: p0 = (2, −1,0), p1 = (2,1,0), p2 = (−1,1,0), p3 = (1,0,4) How can I determine the unit normal (facing outside) of the triangles faces of the tetrahedral? And how can I calculate the implicit equation of the planes…
ron
  • 57
  • 4
1
vote
1 answer

How to create dataframe by randomly selecting from another dataframe?

DP 1 DP 2 DP 3 DP 4 DP 5 DP 6 DP 7 DP 8 DP 9 DP 10 (0.519) (1.117) (1.152) 0.772 1.490 (0.850) (1.189) (0.759) 0.030 0.047 0.632 (0.608) (0.322) 0.939 0.346 0.651 …
Devil
  • 83
  • 8
1
vote
1 answer

Changing a pyramid to tetrahedron in opengl

First of all, I am very new to openGL so I don't know all the "basic" stuff yet. I am doing this exercise in a book and I have been able to draw a pyramid but I want to draw a tetrahedron now. But I can't seem to get my head around it. I always end…
Kofi
  • 45
  • 6
0
votes
1 answer

trying to print degree symbol after integer

I am trying to do the find-angle challenge in hacker rank, I got the value of the angle as an integer but hacker rank requires me to give the output with " ° " symbol at the end, how do I tackle this, P.S. the platform does not allow ascii…
0
votes
1 answer

Error while build triangle from source: c1: fatal error C1083: Cannot open source file: 'c/triangle.c': No such file or directory

I am getting this error while trying to build triangle (The source file can be accessed from here: https://github.com/drufat/triangle) from source: ` c1: fatal error C1083: Cannot open source file: 'c/triangle.c': No such file or directory error:…
0
votes
2 answers

Fast, but not necessarily pinpoint accurate, closest point on 3D triangle?

I have a case where I need to find the closest point to a sphere's center on a LOT of triangles. However, the accuracy isn't quite so important... it needs to be vaguely accurate, but an error rate of like 5% would be acceptable. Currently I'm…
KiraHoneybee
  • 495
  • 3
  • 12
0
votes
2 answers

Half of the triangles of the custom mesh is not created Unity?

I generate a world and record it inside a grid map. Then I draw this map by programmatically drawing a mesh. However when I generate a bigger map half of it is missing. Is there a triangle limit on each mesh or am I doing something wrong? To…
WVrock
  • 1,725
  • 3
  • 22
  • 30
0
votes
0 answers

How can I create a triangle with a white interior, black border lines, and text inside it in REACT?

I have searched online and asked to chatGPT, but those answering can only draw a triangle like these ▲, ▼, ◀, ▶, ◢, ◣, ◥, ◤. What I want to create is a triangle with empty inside, black border lines like this one, △. Any of ▽, ◿, ◺, ◹, ◸, ▲, ▼, ◀,…
doo
  • 1
0
votes
2 answers

Making a triangle using the turtle but the sides don't connect at the end

import numpy as np import math as m import turtle as t s=[3, 4, 5] #expression below is used to calculate the angle between two sides of a triangle a1=m.degrees(np.arccos(((s[1]**2 + s[2]**2 - s[0]**2) / (2 * s[1] *…
0
votes
1 answer

WebGPU. How to draw the Triangle Strip with different color for each Triangle?

The first triangle must be RED, the second triangle must be GREEN. But both are GREEN ((( How to set different colors for each sub-triangle in 'triangle-strip' primitive topology ? My final goal is: Creating new triangles with new colors at mouse…
Teamur
  • 67
  • 1
  • 4
1 2
3
8 9