Questions tagged [coordinate-system]

A coordinate system is a system which uses one or more numbers, or coordinates, to uniquely determine the position of a point or other geometric element. Do not use this tag for questions regarding longitude and latitude. Please use [geospatial] instead.

Filter by
Sorted by
Tagged with
0
votes
1answer
592 views

Class for finding the median of a two-dimensional space

I have a simple static class that it's purpose is given an RDD of Point to find the median of each dimension and return that as a new ...
10
votes
3answers
2k views

Heavily limited premature compiler translates text into excecutable python code

My goal is to write a smaller compiler-like program, which allows me to draw geometric shapes into a 3D Diagram. There is no need for turing-completeness and the program should only be viewed as an ...
8
votes
2answers
173 views

Type-safe cartesian co-ordinates

I've recently been fiddling around with a type safe implementation of cartesian co-ordinates (and a few operations on those co-ordinates). Often it's easy to get units mixed up: is something in metres,...
12
votes
5answers
2k views

Algorithm that spans orthogonal vectors: Python

The code consists of three functions: Spans arbitrary vector (takes dimension as an argument) Spans vector orthogonal to the one passed in the argument Finds cross product between two vectors. The ...
4
votes
1answer
444 views

C++ mathematical n-dimensional vector template using fold expressions

I'm writing a template to unify a few mathematical vector types I was using. The goal is low overhead, constexpr where possible and generic utility functions built-...
4
votes
1answer
273 views

Plotting discontinous function

I've made a simple web plot with D3 JS version 4. I've drawn a discontinuous function: $$f(x)=\frac{1}{x(x-2)}$$ which has 2 vertical asymptotes and 1 horizontal asymptote. I add a legend with LateX:...
8
votes
1answer
83 views

Mutable 2d Vector classs

I create a 2dVector class to use a position coordinates in a pygame application and maybe in the future as part of a physics engine. Does this implementation has any huge downsides? Is the type ...
6
votes
1answer
544 views

Moving a rover and receiving current coordinates

I made a little text-based game where you move a rover and it gives you the current coordinates. You can essentially move around a 1000x1000 grid, and get output into ...
6
votes
5answers
386 views

“Critter Tracking: When does it cross its own path?” Part 2

Basic Info: This question is my second attempt at this question. It is based on a question similar to this Codility question. The input (an int array), the outpout (an integer) and the method ...
5
votes
4answers
497 views

“Critter Tracking: When does it cross its own path?”

Added: Version #2 of this question Minor Update/Additonal information: This question is based on a Codility question similar to this one. The input (an int array), the outpout (an integer) and the ...
5
votes
1answer
606 views

Extracting an adjaceny matrix containing haversine distance from points on map

I am extracting 10 lat/long points from Google Maps and placing these into a text file. The program should be able to read in the text file, calculate the haversine distance between each point, and ...
4
votes
1answer
499 views

Tested cartesian plane utility

I am starting to explore automated testing of code, so I decided to write some trivial code about the cartesian plane and test it. I am particularly interested in automated testing conventions and ...
4
votes
1answer
77 views

vector3 math module

I'm writing a little math module in C to handle vectors and matrices. This will be column-major style but right now I've only finished the basics of the vector functions and wanted some feedback on ...
2
votes
2answers
578 views

Convert a String with comma separated latitudes and longitudes to a Seq[Coordinate]

I have a function that receives a String like the following: "-10.0 -10.0,10.0 10.0,0.0 0.0" And needs to translate that into ...