Questions tagged [geometry-class-library]

11 questions
10
votes
1 answer

Visual Debugger for Geometric Objects

When working on my library representing geometric objects, Debugging currently looks like this: Here I am viewing the local variables in the Autos, Locals, Watch and Immediate windows. As I have trouble imagining the shape of the object in my mind,…
9
votes
2 answers

When to use a Mock v. Stub, or neither?

I've been reading up on Mocks and Stubs, their differences and uses. I'm still a bit confused, but I think I've got the jist of it. Now I'm wondering about applications. I can see the use in creating "fake" objects in testing scenarios where the…
6
votes
3 answers

Outermost Polygon from a set of Edges

Suppose I have a set of 2d line segments that are all connected. I need an algorithm that finds the outermost segments in the set. That is, the minimal subset that bounds the same region. Note: this is not the same as finding the convex hull of the…
5
votes
1 answer

Smallest Rectangular Box that surrounds a polyhedron

I'm looking for an algorithm that finds the smallest box enclosing a polyhedron. My idea is as follows: find the largest side, and move the solid so that side aligns with the x axis. Find the next largest side that meets this side, and align it as…
4
votes
2 answers

How to Combine Polyhedra?

Suppose I have a 2 Polyhedrons, partially overlapping in space. Each is defined by a list of connected Polygons, which in turn are defined by lists of line segments, (which are defined by 2 points). Is there a simple algorithm for creating the…
3
votes
1 answer

Finding a common interior point to two polygons

Suppose I have overlapping polygons. Neither is necessarily convex. What's an efficient algorithm to find a point interior to both of them and not on either's boundary? Assuming that they overlap, and our polygons are defined by their sets of…
3
votes
1 answer

List of a Generic Typed Parent not Accepting a Child with a Type that is a Subtype of the Parent List's Type

Here is my current class diagram: As you can see, both Polygon and NonPolygon are types of PlaneRegion and LineSegment implements IEdge.The PlaneRegion is Generic so we can make its list of PlaneBoundaries either IEdge for NonPolygon so it can have…
Keith R
  • 411
  • 2
  • 4
2
votes
0 answers

What is the advantage of using Euler Angles over spherical coordinates?

I'm working with an application where relative coordinate systems are stored as a list of Euler Angles and a translation. Is there any good reason, to represent the rotation using Euler angles over spherical…
2
votes
1 answer

How to fix Precision problems

I have several classes that follow the same basic concept for dealing with units. Here is a simple example of one being used in a unit test: [Test()] public void Angle_MathOperatorTest() { Angle a1 = new Angle(AngleType.Degree,…
jth41
  • 3,808
  • 9
  • 59
  • 109
1
vote
0 answers

Unable to import import javafx.geometry.Point2D

When trying to import javafx.geometry.Point2D, i get the following error message: Access restriction: The type 'Point2D' is not API (restriction on required library 'C:\Program Files\Java\jre1.8.0_65\lib\ext\jfxrt.jar') I have tried to import…
Esben86
  • 483
  • 8
  • 21
1
vote
1 answer

Call function of Visual Studio Package

I have created a new Visual Studio Package that when loaded creates a Tool Window that looks like this: It is comprised of some controls with canvases and such that draw shapes in 2 or 3 dimensions. Right now they work in the initialization step to…