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

How to set different color to the neighboring color of selected triangle?

I am trying to implement a method using ray casting in unity where I can set different color to selected face of triangle and set different color to the contacted triangle (neighboring triangles) but when I am running it's coloring all triangles…
0
votes
1 answer

Rounded corners in svg

I am trying to create a triangle (polygon element) using svg. Is it possible to give it a rounded corners? I am thinking about using the same option as in this case (https://www.w3schools.com/graphics/svg_rect.asp) in example 4, but I am not sure…
zosia
  • 1
  • 1
0
votes
0 answers

How to change the neighboring color of selected triangle?

Image from unity scene Hello, by the help of stack overflow (Unity | mesh.colors won't color my custom mesh object I was able to solve the problem where I can see the colorized triangle's face after being selected using ray-cast in unity as shown in…
0
votes
0 answers

How to set size of screen in Java StdDraw.filledPolygon(x[],y[]) without using SetXScale and YScale? Are there any limitations for array inputs?

public static void filledTriangle(double x, double y, double length) { // add length / 2 to shift right the filled triangle double[] xArray = { x - length / 2 + length / 2, x + length / 2 + length /…
0
votes
1 answer

Output of the shape

How can I improve code that would output this fixed-size shape to the console? Shape: #.... .#... #.#.. .#.#. #.#.# .#.#. #.#.. .#... #.... I wrote the code, but it seems to me incorrect. Although he copes with this task. I want to combine all the…
ann_txg
  • 11
  • 2
0
votes
0 answers

c++ triangle rasterizer z buffer issue

I'm quite new to c++ and coding in general, so excuse what may be strange looking c++. I've been making my own 3d engine for the past while and have run into an issue with the z buffer. All the pixels work out great usually, but there are certain…
Sol
  • 1
  • 1
0
votes
1 answer

Claculating area of a tringle by using defined area function: how to return function value, Python

I am a beginner with Python and trying to calculate the area of a triangle. The task asks to define the area function, and I can't get it to return a valid value (should be float) to the main function. from math import sqrt def area(linea, lineb,…
emkay
  • 25
  • 3
0
votes
1 answer

Draw isocele triangle according to angle in javascript canvas

I would like to know how can I draw an isocele triangle in canvas, if I know the first angle, and the lengths of the two equal side. Shema (known lengths are in red) And second question, is it possible to curve the top side like that : Shema
0
votes
1 answer

How to implement a triangle overlay on a banner with background?

I am trying to create a banner with a background image, behind a triangle shaped border: I have tried using borders on both the :before and :after pseudo selectors, but I cannot achieve the above, especially when it comes to responsiveness.
TJDev
  • 133
  • 3
  • 13
0
votes
1 answer

How to generate a triangle free graph in Networkx (with randomseed)?

After checking the documentation on triangles of networkx, I've wondered if there is a more efficient way of generating a triangle free graph than to randomly spawn graphs until a triangle free one happens to emerge, (in particular if one would like…
a.t.
  • 2,002
  • 3
  • 26
  • 66
0
votes
1 answer

Using definition on elements of a list to decide which give smallest answer

In the code below I have calculated which triangles cover a certain point. Now I am trying to let the function perimeter calculate the perimeter of the left over triangles which can be found in triangle_fit. And when I know the perimeters of these…
SimonDL
  • 186
  • 10
0
votes
1 answer

Sum of the numbers in a triangular shape using Python (only using one digit)?

Given a list such as the following: [1, 5, 8, 13, 4], we want to find the sum of two consecutive numbers as shown below. We should take into account that if a number on the list has more than one digit, it needs to be changed the digit in the last…
Jack White
  • 23
  • 4
0
votes
4 answers

How to draw a circle inside a triangle css

I am trying to put this circle in the center of the triangle. I set the class triangle to display flex but it didn't work. Please help me. The code: body { display: flex; align-items: center; justify-content: center; } .triangle { …
user16739579
0
votes
1 answer

How to calculate the distance vector from texel to the closest triangle edge to be saved in a FBO texture

I have a triangle which I pass through a vertex and fragment shader. I want to draw per texel a correction vector u (encoded in r and b channel) that points onto the closest edge (or even one pixel further) in the coordinate space of the vertices…
Sebastian Barth
  • 4,079
  • 7
  • 40
  • 59
0
votes
0 answers

Macro VBA message box for triangle side

I am trying to create a macro that asks the user the side of a triangle and that displays its properties. We may control the validity of the parameters, displaying the error messages when needed. I wrote the following code, but it does not seem to…
A.S
  • 9
  • 2
1 2 3
8 9