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
5 answers

how can I do an empty triangle with stars in c++ to after do the british flag?

This is the flag that I have to get at the end: ******************* ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *** * ******************* *…
1
vote
3 answers

Finding total amount of paths in a triangle grid (iterative without recursion)

i have a given a triangle grid: Triangle For every point (i,j) with i+j being even: Given recursive function Now i need to write a iterative function that finds all possible paths from (0,0) to the point (2n,0) given that n ∈ N. So my idea, written…
1
vote
2 answers

C For Loop Floyd's Triangle but different?

I need help on how to do a Flyod's Triangle style but instead of input value in rows, the triangle is based on the input value as a whole. instead of; Enter a number: 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28…
1
vote
1 answer

Inverted half pyramid using numbers in JavaFX

I made a normal half pyramid in JavaFX with this code public void buttonpressed() { int iNum = Integer.parseInt(Num.getText()); String sResult = ""; String sNumber = ""; for (int i = 1; i<=iNum; i++ ) { sNumber += i; …
monsone
  • 13
  • 4
1
vote
1 answer

How to delete a certain delaunay triangle from the list of tri.simplices in Python

i construct two Delaunay triangulations from two different numpy arrays of vertices. They have two identical triangles, which i want to delete from one of the triangulation list. If somebody can help me out here i would really appreciate it. Thanks…
1
vote
4 answers

Python How to make a number triangle

So I've recently started learning python and my friend gave me a changllege. How to make a number triangle. So basically, I need to make python let me input a number, for example 5. After I do that, I want python to print 54321 4321 321 21 1 But…
user18629050
1
vote
2 answers

How to write triangle with stars in Php. (*) I want to do it with while

I did this with a "for" loop. How can I write this with while. Thank you for your help. I just started learning PHP. for ($a=0; $a <=10 ; $a++) { for ($y=0; $y <= $a ; $y++) { echo "*"; } echo "
"; } for ($a=10; $a >=1 ;…
Apo
  • 47
  • 3
1
vote
2 answers

Print triangular number patterns with loops and modulus calculation

I need to print a number pattern like this: 1 12 123 1234 2 23 234 2341 3 34 341 3412 4 41 412 4123 My code: for($i=1; $i<=4; ++$i) { for($j=1; $j<=$i; ++$j) { echo $j; } echo ("
"); } for($i=2; $i<=4; ++$i) { for($j=2;…
Arief
  • 57
  • 8
1
vote
1 answer

Trouble With Barycentric Rasterizer (based on the ryg blog)

I have been trying to implement the optimized rasterizer outlined in this blog: https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/. The naive approach outlined in his prior blog post…
aurreco
  • 21
  • 3
1
vote
0 answers

Normal Vectors & Directions

What i'm trying to do is compare Normal vectors to know if multiple surfaces are positioned at the exact same direction and if not then to be able to tell how close in direction to each other they are by the difference in their Normal values. So…
1
vote
0 answers

Unity 3D Mesh Generation with Quads to Triangles

My goal is to create a simple flat mesh with a grid of vertices. These vertices are then manipulated to create a simple terrain with some areas being raised and flat like a plateau, and these plateaus are connected to the areas below by slopes. The…
1
vote
1 answer

How to make squares on each side of the triangle without hard-coding the squares?

I have a data.frame containing 4 points, which creates a triangle when connected using geom_path: library(ggplot2) triangle = data.frame(x = c(0, 0.5, 1, 0), y = c(0, 0.5, 0, 0)) ggplot(triangle, aes(x, y)) + …
bird
  • 2,938
  • 1
  • 6
  • 27
1
vote
1 answer

Font size of x and y label with triangle_plot

I want to increase the fontsize of the x and y label of my triangle plot. I tried as in this question: Changing the size of labels of plots in python but it's not working for me... here is my code import getdist.plots as gdplt from getdist.mcsamples…
Apinorr
  • 166
  • 3
  • 14
1
vote
0 answers

How to construct triangles when adding a point to a triangle?

How can I construct the new triangles that exist when adding a point to an existing triangle? Basically if starting with the red triangle, adding the green point, creates 3 triangles. This part I think is pretty straight forward: I would determine…
RenaissanceProgrammer
  • 404
  • 1
  • 11
  • 30
1
vote
1 answer

Finding all the triangles possible out of coordinates (python)

Hello everyone i am new here. So far i have had a lot of information from StackOverflow so thanks everyone. I got 6 coördinates: A: (4,2) B: (6,1) C: (9,4) D: (8,9) E: (5,2) F: (2,2) And i have a measured position, lets say P=(3,7) I want to find…
SimonDL
  • 186
  • 10
1
2
3
8 9