Questions tagged [triangular]

Use this tag when you have a programmatic problem related to coordinates, area, or any other property of a shape that forms a triangle.

The shape formed by a polygon which has three sides is said to be triangular in nature.

Triangular shape has been discussed, analyzed, formed mathematical formulas around, explained in different contexts since the inception of the idea of geometry.

You can read more about triangular shape and it's properties here.

157 questions
2
votes
2 answers

How to speed up memory allocation for 2D triangular matrix in c++?

I need to allocate memory for a very large array which represents triangular matrix. I wrote the following code: const int max_number_of_particles=20000; float **dis_vec; dis_vec = new float **[max_number_of_particles]; for (i = 0;…
funny man
  • 105
  • 1
  • 7
2
votes
1 answer

How to include triangular Material Design AngularJS Admin Template to cg-angular generator,i want to build an app using the triangular template?

I am a beginner in programming, I am trying to build an AngularJS application ,am using the generator 'cg-angular' using yeoman, i want to include triangular material design template to my AngularJS application.
Sabreena
  • 619
  • 2
  • 11
  • 25
2
votes
3 answers

R: Create list from vector in "triangular" form

I found it hard to formulate the question but I would like to find a clever way (not using loop) to get the following result: > my.vector = letters[1:6] > print(my.vector) [1] "a" "b" "c" "d" "e" "f" > > my.list = (rep(list(NA),6)) > for (i in…
Gabriel Mota
  • 302
  • 1
  • 10
2
votes
1 answer

Plot triangular grid with cartopy and matplotlib.tri

I'm trying to plot a triangular grid with cartopy and matplotlib.tri. I use a matplotlib.tri.Triangulation object and would like to plot it with matplotlib.pyplot.triplot. When I pass the cartopy projection as a transformation to triplot with…
gernot
  • 21
  • 4
2
votes
3 answers

C++ OpenCV triangle detection using hough transform

I'm looking for some examples how to implement hough transform for triangles detection. It's for sign detection needed. I've already done color thresholding. What do you think about using HoughLinesP()? I'm doing Canny, then thresholding and using…
2
votes
1 answer

Finding boundary edge loops in a half-edge triangle mesh

I am working on a project that requires a triangle soup be converted to an actual structured mesh in order to apply operations to the mesh. The mesh object is a half-edge type structure with the following items: Vertex { vec3 position, int edge /*…
Katniir
  • 41
  • 6
2
votes
2 answers

Detect not complete/perfect triangles

I am tryng to detect traffic signs by their colour and shape, i have the binary image from de colour segmentation and i try to detect triangles in it, by unless all the sides of the triangle are complete y doesnt work, in this image for example it…
Kailegh
  • 199
  • 1
  • 13
2
votes
2 answers

How to simply downsample a triangular mesh?

This requirement occur when I show the surface mesh in Matlab by trisurf, because the mesh is dense (high-resolution) and it is rendered slowly and can not be rotated. So I am wondering there is some intuitive method to downsample the mesh while…
nicozuo
  • 21
  • 4
2
votes
2 answers

julia language Triangular distribution parameterization

Julia seems to be parameterizing the triangular distributions using location and scale parameters only. How does this translate to the location, shape, scale parameterization. for example suppose that Z has the basic triangle distribution with…
Leon Adams
  • 491
  • 4
  • 10
2
votes
0 answers

C++ Is a matrix triangular?

So we have a nxn matrix (n <= 20). If a[i][j] == 0 when i > j and a[i][j] != 0 when i <= j ... or ... a[i][j] == 0 when i < j and a[i][j] != 0 when i >= j ... the matrix is called triangular. I suppose in a 3x3 triangular matrixes look like this 1 1…
user3213110
  • 199
  • 4
  • 14
2
votes
2 answers

Triangular Lists in Haskell?

I have to write a function (without using preloaded functions) that decides if a certain list of Ints is triangular or not, and by triangular I mean if it increases up to a certain number and then decreases, for example: [2,4,5,7,4,3] but also: [],…
haskelllearner
  • 189
  • 2
  • 8
2
votes
1 answer

How can I draw a triangle in an image in MATLAB?

I need to draw a triangle in an image I have loaded. The triangle should look like this: 1 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 But the main problem I have is that I do not know how I can create a matrix…
Hashim Al-Arab
  • 154
  • 2
  • 5
  • 11
2
votes
5 answers

Reading a symmetric matrix from file that omits upper triangular part

Using R, what is the best way to read a symmetric matrix from a file that omits the upper triangular part. For example, 1.000 .505 1.000 .569 .422 1.000 .602 .467 .926 1.000 .621 .482 .877 .874 1.000 .603 .450 .878 .894 .937 1.000 I…
Student
  • 325
  • 2
  • 9
2
votes
4 answers

Check if matrix is upper triangular (c++)

I have been trying to write code that determines if a matrix is upper triangular or not, and print it. I have tried while loops, double for loops, nothing. Here is the mess I currently have: int i, j; int count = 0; bool upper; while (upper =…
user1824947
  • 21
  • 1
  • 2
2
votes
2 answers

Large Sparse Matrix to Triangular Matrix R

I have a very large (about 91 million non-zero entries) sparseMatrix() in R that looks like: > myMatrix a b c a . 1 2 b 1 . . c 2 . . I would like to convert it to a triangular matrix (upper or lower), but when I try myMatrix = myMatrix *…
rfoley
  • 345
  • 3
  • 15
1 2
3
10 11