# 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.

185 questions
Filter by
Sorted by
Tagged with
1k views

### Constructing polygons from the edges in a Voronoi diagram

I am working on a Java program which creates a map using Voronoi. I am using a Java library which generates Voronoi and it is very fast. The problem I am facing is that, then, I have to scan every ...
40 views

### Codewars: Remote Control Virtual Keyboard

This is my solution to the Codewars problem TV Remote (symbols). Description In short, you are given a virtual keyboard with 3 modes between which can be switched by pressing the ...
389 views

### 3D wrapper for turtle

I am a Python enthusiast, but I'm never sure if what I'm doing is Pythonic. I have made my own graphics wrapper for Python's turtle. I don't entirely know if I did this right, so I have come here for ...
111 views

### Z sorting implementation for a 2D isometric game

This is a naive implementation of a Z-sorting in order to fake 3D depth using sprites in a 2D scene. I would appreciate feedback on this, especially for performance as this has to be called each frame ...
32 views

### Adding vector functionality to TI Calculators

Although TI-83/84 calculators support multiple data types, such as real numbers, complex numbers, 1D and 2D lists, fuctions, etc., there is no data type for vectors. This program is my attempt to take ...
59 views

### Calculating all combinations to make sure a Random algorithm has done them all

I have done this, but it's pretty ugly and it feels like I may be missing something to shorten it: ...
112 views

### Updating the coordinates of items possessed by a moving person

A Person has coordinates and an Item has coordinates as well, and hence both are derived from ...
45 views

### Get radial distance between vector1 and vector2

A small script to calculate total units of distance between two vector entities. Especially useful in games and grid snaps, inventory snaps etc.. ...
10k views

### Defining std::vector::push_back(new Object)

Is this the best way to construct a vector of 2D points for return? I don't entirely understand new and delete so I'm concerned ...
86 views

### Reposition vertices at the origin of a coordinate system

This method repositions vertices of an object in such a way that the center of the object is at the origin of the coordinate system. The task is the commented part. While my code does the job I feel ...
3k views

### Cartesian/polar coordinates program

Can I get my program checked for efficiency? As in, see if there are better ways of writing my code, for example, making more efficient use of memory and/or security options like where to use ...
1k views

### constexpr math Vector class

I am currently playing a bit around. While the current compiler starts to finally release the c++17 standard implementations, I am trying to create a mathematical ...
76 views

### Comparison functions for 2D points [closed]

I have the following class for 2D points: ...
80 views

### Reflection of an object in a 3D world

The following is a excerpt from a class that is supposed to represent a reflection of an object in a 3D world, like in a mirror. After I started I discovered that mirroring is a property of an object,...
43 views

### Dynamic field access in Haskell

I have to transform a response into the internal Coordinate record, some of the fields are lists and I need to handle empty lists case. Records: ...
122 views

### Finding angle and direction between line segments

I'm putting together a short demo on two things: Finding the angle between two line segments and direction (right or left) as you travel counterclockwise around a shape Using newer ecmascript syntax (...
1k views

### Simple vector calculator [closed]

I am fairly new to Python and programming. I created this simple calculator inspired by my physics class. However, I feel this code could have been done more efficiently. Is there any advice for ...
184 views

### Generate new latitude and longitude in decimal

I have created simple algorithm to generate the new Location from given latitude and longitude. ...
3k views

### Converting an SVG polygon path from relative to absolute coordinates

This question was moved from StackOverflow as suggested by some users. I developed a function that aims to (should) provide a simple and effective method to transform a polygon ...
135 views

### Vector addition and Pythagorean Theorem code

I would like to share my code that is meant to help me add 2 vectors together. It is very simple and I would like to kindly ask you whether you could review my code. Also, I decided to keep separate ...
47 views

### Path Following Algorithm for Entity

Within my game there are many entities, where each entity has a path (Array<Vector2>) assigned to it. No path to follow (indicating that the entity should ...
81 views

### Reusable vector module with tests

I'm learning rust with mostly a background in managed languages. I have a little C background. As a learning project I am re-implementing a linear-transformations library I've been working on in ...
101 views

### Parsing latitude and longitude, using Try[T] to ignore errors

I wrote this question asking about how to implement my error handling while still maintaining functional code and based on 200_success's very interesting note on the spaces, I decided to ...
104 views

### Coding on Point interfaces/superclasses instead of implementations

From pretty much any book I've read it always said to code on interfaces/superclasses and rarely on implementations, today though that advice made a bit confused about how I should format my code. ...
1k views

### Nearest point using 2D tree, static variable for the closest point so far

This is a problem from a Coursera class: Write a data type to represent a set of points in the unit square (all points have x- and y-coordinates between 0 and 1) using a 2D tree to support ...
121 views

### Data structure for a list of radial coordinates

I have a loop that's updating a dictionary's values a large amount of time (by adding the new value to the old. Each value for each dictionary key is actually a list of 3 number, and so for each ...
146 views

### Mathematical custom vector in C++

I tried to implement my custom mathematical vector which is easy to use. I wanted to write this code modern way, I mean C++11/14. I create ...
61 views

### Renumbering vertices in a 3D mesh

I'm just guessing if there is any room for improving performance on this code: ...
38 views

### Deleting all points in a quadrilateral

I have a sorted (by x value) ArrayList of points and four separate points that make up a quadrilateral. My code deletes all points in the ArrayList that are inside ...
468 views

### Get vertical acceleration from rotation vector and accelerometer values

My goal here is to calculate the acceleration towards the ground, which I call "vertical acceleration". This seems to be working OK for the most part, except when there is a lot of rotation going on ...
1k views

### Dice rolling swipe Android app

So I've got an Android app where if you swipe in a particular direction (UP, DOWN, RIGHT, LEFT), the dice move in that direction using TranslateAnimation. This is ...
595 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 ...
2k views

### Find minimum and maximum coordinates for a set of points [closed]

I wrote the Python3 code below. This is actually a stripped down version of a bigger project, but in essence it boils down to this code. There are two classes: Point...