Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
89 views

I used this method to draw squares and triangles on the paint box: procedure squarClick(Sender: TObject); begin  canvas.Pen.Color := clgreen;  canvas.Pen.Style := psSolid;  canvas.Pen.Width :...
Ebrahim's user avatar
  • 25
1 vote
1 answer
61 views

I'm currently trying to make a program in MASM assembly language that will print out a series of right triangles based on an integer value that the user inputs. For example, if the user input is 3 ...
Nicholas Davies's user avatar
0 votes
0 answers
28 views

I'm trying to write a program that will calculate the angles of a triangle using the side lengths (via the Law of Cosines, Law of Sines, and Triangle Sum Theorem). It works just fine if all the side ...
oxiiacid's user avatar
0 votes
0 answers
164 views

I am trying to process shapely polygon geometries and decompose them into triangles with the constraint that triangle vertices can only exist on the polygon edge(s). For some strange reason the code ...
Judith Levy's user avatar
0 votes
2 answers
63 views

I am using Gmsh to generate a mesh that should be symmetric. I expected mesh in the Curve Loop (6) and Curve Loop (7) are symmetrical. But in fact, they are not as can be seen in the figure. Could ...
Wen Luo's user avatar
2 votes
1 answer
64 views

Using Visual Studio 2017 and OpenFrameworks I've drawn a triangle as follows: ofDrawTriangle(ofPoint(0, -fHigh / 2, 0), ofPoint(fWide / 2, fHigh / 2, 0), ofPoint(-fWide ...
James C Wright's user avatar
1 vote
0 answers
36 views

When I use my code: `const gl = WebGL.gl; const programInfo = WebGL.programInfo; const fieldOfView = (this.camera.FOV * Math.PI) / 180; // Convert FOV to radians const aspect = ...
renderthegreat's user avatar
0 votes
1 answer
80 views

I have multiple objects that I created which include data I need for each triangle. I now want to create triangles and export to csv, but I have so many datasets that I'd like to do this in a loop. ...
JustAskingQuestions's user avatar
1 vote
2 answers
82 views

We are trying to create a triangle of stars using java, but the restrictions are that you cannot use any loops, extra methods, add extra parameters, add extra variables, or even use string methods. ...
Smartie's user avatar
  • 107
0 votes
1 answer
57 views

So my client is interested in creating a hover effect for captions/links as shown in the below mockup: The problem with CSS triangles (as I know it) is that it doesn't grow with the text. While it is ...
Hex1189's user avatar
  • 29
0 votes
2 answers
224 views

I'm trying to make a program that takes input number of rows from the user and prints this type of pattern for example if "number of rows: 5", then it should print this pattern OUTPUT I WANT ...
Prince Kumar Prajapati's user avatar
0 votes
1 answer
73 views

How do I add a newline between two triangles and without a newline at the end of the triangle? Sample Input 4↵ 5↵ Sample Output *******↵ *****↵ ***↵ *↵ ↵ *↵ ***↵ *****↵ *******↵ ...
user22881508's user avatar
-1 votes
1 answer
35 views

What do I need to call to change my symbols in a Fastpoint VB.net chart? It auto selects circles squares triangles and diamonds at random. However, I am needing them all to be diamonds and or ...
Nate's user avatar
  • 25
0 votes
1 answer
121 views

I'm trying to use J. Shewchuk's mesh generation library Triangle in a C++ program. To do this I first downloaded triangle.h and triangle.c from the Triangle website. Then, in triangle.c I included ...
BenPol's user avatar
  • 93
0 votes
0 answers
41 views

I would like to change the color of a mesh triangle when I click on it. The following code is not working. When I draw a debug line then the correct triangle is highlighted, but the color is not ...
kbdev's user avatar
  • 59
0 votes
1 answer
147 views

/len = length, hei = height /get and store input input store LEN input store HEI /start of loop /load in the value of len LOOP, load LEN /add len to num add NUM /store the value in num Store NUM /...
damingo's user avatar
-1 votes
1 answer
65 views

I want to create a triangle and set a link (changing cursor etc) only to the visible area of this triangle, leaving the transparent area untouched and unlinked. All the solutions here, I tried to ...
Marcos Laredo's user avatar
1 vote
1 answer
64 views

L2+L3>= L1 et L2+L1>= L3 et L1+L3>= L2 are the 3 conditions that must be verified to admit if it's a triangle or not. I tried the code below but it's giving me wrong answers and I'd like to ...
Zahra 's user avatar
  • 85
0 votes
1 answer
62 views

I tried to put CSS-drawn triangles in a table, but the points are not matching. (Please find attached picture) Does anybody know how to achieve it without a canvas? It also changes with the zoom ...
ChristophDaniel's user avatar
0 votes
1 answer
115 views

I have a logical square array such that a value of 1 signifies that light is allowed to pass through the array at those points, and a value of 0 means that light is blocked. How do I create a ...
requiemman's user avatar
1 vote
1 answer
540 views

Using trimesh, I need to find the triangle id for a point given a triangular mesh. The point lies on an edge of the mesh or it may be a triangle vertex. import trimesh import numpy as np mesh = ...
user27665's user avatar
  • 711
0 votes
2 answers
118 views

I'm trying to make it so that a triangle, with its two base points always staying on the outer edge of a circle, will point towards where the mouse is. I'm convinced it's mostly a specific math ...
Drew Magro's user avatar
0 votes
1 answer
102 views

I am currently working on a lwjgl project where I need to detect collisions between 3D triangles. I'm using OpenGL, and I'm seeking guidance on the most efficient and accurate way to achieve this. To ...
user avatar
0 votes
1 answer
102 views

/*This program determines whether a triangle can be formed and whether it is a right triangle or not*/ import java.util.Scanner; public class TriangleFormation { //Function to calculate for ...
Raleigh Brecht's user avatar
0 votes
1 answer
2k views

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 ...
potato_noodles's user avatar
0 votes
1 answer
251 views

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/...
Mohsin Bashir's user avatar
0 votes
2 answers
168 views

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 ...
KiraHoneybee's user avatar
0 votes
2 answers
215 views

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 ...
WVrock's user avatar
  • 1,765
1 vote
1 answer
198 views

I am trying to approximate 3d triangles with rectangular prisms but I cant figure out the math Im using lua Ive tried flattening the triangle to a 2d plane and approximating the triangles with normal ...
Bug's user avatar
  • 13
0 votes
2 answers
72 views

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]**...
Parth Ratra's user avatar
1 vote
1 answer
359 views

I'm trying to draw a triangle in qt6 3d, but i got this error in console... Notice that in my project i'm drawing other objects using the classic mesh classes from Qt and everything works perfect.. ...
Razvan B's user avatar
1 vote
5 answers
331 views

This is the flag that I have to get at the end: ******************* ** * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...
ريم's user avatar
  • 23
0 votes
1 answer
877 views

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: ...
Teamur's user avatar
  • 141
0 votes
1 answer
273 views

I want to generate a mesh in Unity. I have GameObjects (segments) that contain GameObjects (points). To create a triange mesh, I set two of the three triangle vertices to the two points of the current ...
doc4's user avatar
  • 5
0 votes
1 answer
275 views

I'm trying to figure out how to get the Height of a triangle: I have startPoint, endPoint and Length: Point startPoint = Start.GetPoint(); Point endPoint = End.GetPoint(); double Length = panel.W + ...
Contagrrla's user avatar
0 votes
1 answer
156 views

I am new to programming. I've been in a class for a week now and I am stuck on this problem for most of my java programs. There was an exception for one of the programs where the code executed ...
mAirborne's user avatar
0 votes
1 answer
69 views

what is wrong with my code to generate the folowing output. I need to use recursive function to complete the program but I get the wrong output. def computeTriangle(levels): ` if levels == 0: ...
Maria's user avatar
  • 1
0 votes
1 answer
216 views

I have implemented the remove triangle for removing selected triangles using raycast in unity. My implementation works fine with mesh in having no components of cloth but when I am adding the cloth ...
user20980680's user avatar
0 votes
1 answer
38 views

The goal was to design a class named "Triangle" , that extends from the class "GeometricObject" , the overall code works fine and has no errors but the problem is that the "...
dareen42's user avatar
-1 votes
1 answer
447 views

I have looked and looked and cannot find any resources on. I want to clip an axis aligned bounding box against a triangle in a way that creates a new tight fitting axis aligned bounding box around or ...
yosmo78's user avatar
  • 641
2 votes
0 answers
189 views

My MTV (Minimum Translation Vector) in AABB/Triangle intersection gives incorrect result on corners by Y axis. How can I fix it? Current result: This is my code: public static bool ...
Rede Boy's user avatar
0 votes
3 answers
458 views

i update my code for this : #include <stdio.h> int IsRightTriangle(float x,float y,float z ) { int result; if( ((x*x)+(y*y)-(z*z)>0.999 && (x*x)+(y*y)-(z*z)<1) ||...
proran's user avatar
  • 9
3 votes
2 answers
287 views

I know of an equilateral triangle the center (cx,cy) and the radius (r) of a blue circle which circumscribed it. If I draw a green circle of any radius (radius), assuming the circle is large enough to ...
Richnou's user avatar
  • 126
0 votes
0 answers
87 views

Can I print this with triangle shape in Java? I tried to print this with only border "1"s: int[][] matrix = new int[5][5]; for (int i = 0; i < 5; i++) { matrix[i][i] = 1; matrix[...
Muhammadali Abdurashidov's user avatar
-3 votes
2 answers
569 views

I'm supposed to print a triangle int tri(int rows) in c using recursion without multiplication or loops. The triangle should have one * in the 1st row, two ** in the 2nd row, three *** in the 3rd row ...
Leyla's user avatar
  • 1
1 vote
3 answers
296 views

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 ...
CWT_Simon's user avatar
0 votes
1 answer
238 views

I am sure I have missed something obvious, but I am trying to draw a quadratic curve between two points using an html canvas, for which I need a 'control point' to set the curve. The start and end ...
m.tracey's user avatar
  • 343
1 vote
2 answers
182 views

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 ...
LittleBeginner's user avatar
0 votes
1 answer
743 views

I have 2 types of fuzzy function => triangle and trapazoid .. the triangle function take value and 3 points ( a,b,c's of triangle) and the trapazoid take value and 4 points ( a,b,c,d's of trapazoid ...
Ahmed Abd El-Samie's user avatar
0 votes
1 answer
83 views

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 ...
newCoderMe's user avatar