# Tagged Questions

a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry.

149 views

### Refactor code to find four co-linear points

I am relatively new to Java, but have been reading up on how to improve the quality of my code. I am writing a system where I take in a series of points from a file with x and y co-ordinates and by ...
43 views

### Move Line across Plane

I want move a Vertical line segment across a plane or another way sweep the plane, from Left to right. The figure illustrates how the segment is moving at the X-axis. When x1 >= X beginning and i ...
121 views

### Best way to work out angle between points?

I have the following JavaScript code to work out the angle between two points (clockwise). The code I have seems a bit "hacky" to me, as I have a while loop ensuring the number is not negative (to ...
138 views

### Complex logic that I'm certain can be simplified

This is code from a grappling hook implementation. This is specifically code that, after a block is detected between two way points, it tries to find a path around. This particular piece of the ...
504 views

### Overlapping rectangles: Interview Question

Got the following question in a technical interview today (for a devops/SRE position): Write a function which returns true if the two rectangles passed to it as arguments would overlap if drawn on a ...
111 views

### recursive algorithm to obtain grid points inside a n-cube volume or surface

I did wrote in python two functions to return points in the n-dimensional cube of half size K (meaning that the coordinates along each axis go from -K,.. 0.. K). The n-dimensional cube volume should ...
444 views

### Speed up solution to Project Euler problem 75

I've been programming for a few months now, and have used Stack Overflow a great deal, but this is my first post. Anyway, I wrote this code for Project Euler problem 75, which asks how many integers ≤ ...
396 views

### C# code to derive tangential points between two circles to create a trapezoid

These are the steps to determine coordinates of the 4 points (P1, P2, P3, P4) that make up a tangential trapezoid connecting to circles. Another way of looking at it is to think of the tangential ...
186 views

### Trying to implement a collection class to represent a Path of Segments

I've posted a few times over on stack.overflow recently and have been advised to try here to sort out a good code implementation once and for all. I'm trying to implement a custom made 2D geometry ...
147 views

### Am I doing this ray reflection correctly?

I'm am trying to reflect a ray of a triangle using Processing and not sure I got the code right. I'm using two bits of pseudo code from two locations: Intersection of a Line with a Plane from Paul ...
311 views

### Missed lab, wondering how this bit of Java code could be improved anyway?

I'm not able to get feedback on this because I forgot about the lab due date, but I'd appreciate some critique anyway. It takes in a user specified number of points then finds the two points with the ...
146 views

### Normal calculation for tile terrain geometry

What do you think about this one? Other than declaring an Epsilon constant, of couse. It does generate pretty decent normals but I'm not sure if I could improve it even more without losing ...