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.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16
votes
0answers
201 views

Rubik's cube mode for emacs

Following is a dumb implementation of Rubik's cube for Emacs. I am not well versed in writing (e)lisp, so I ask for a review and corrections. ...
15
votes
0answers
183 views

Tracking the bounding box of a map

Context I have a bunch of data points that look roughly like this: ...
4
votes
0answers
413 views

Building Data abstraction and ADT for rectangle using “objects”

For the below given exercise: Exercise 7: Abstracting Rectangles Implement a representation for rectangles in a plane. (Hint: You may want to make use of your procedures from exercise 5). Then,...
3
votes
0answers
243 views

Define a class for latitude and longitude in C++ using boost::units and spheroidal coordinates

I am trying to write a class that defines latitude and longitude in C++ using boost::units and normalized spheroidal coordinates. I want to throw an exception if ...
3
votes
0answers
79 views

Best path using some intermediate points, where cost is either x-axis or y-axis distance

We are given N Cartesian points \$(x, y)\$. Anytime we move from \$i\$-th point to the \$j\$-th, the move costs \$\min\left(\left|x_i - x_j\right|, \left|y_i - y_j\right|\right)\$. The problem is to ...
3
votes
0answers
407 views

Building a k-d tree in Python

To learn Python, I have implemented a function that creates a k-d tree from a list of 2-d Points. I would like to refer to this question where i asked about the k-d tree in C. However, the Python code ...
3
votes
0answers
447 views

HTML5 canvas Snake game

My most recent project is this simple Snake game, and I would like to know what you think of it and if you have any suggestions. ...
3
votes
0answers
54 views

After effects expression to prevent objects to lay on odd pixels when a Keyframe is applied

I made a scripted expression for after effects a while ago. This script is preventing objects to lay on odd pixels when a Keyframe is applied. ...
3
votes
0answers
636 views

Finding Bounding Boxes

Given a set of overlapping boxes, and a set of points, I'd like to be able to determine which of the boxes contain each point. The number of points is much larger than the number of boxes, and I'd ...
2
votes
0answers
18 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 ...
2
votes
0answers
263 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 ...
2
votes
0answers
110 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 ...
2
votes
0answers
31 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 ...
2
votes
0answers
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: ...
2
votes
0answers
111 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 ...
1
vote
0answers
96 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 ...
1
vote
0answers
128 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 ...
1
vote
0answers
58 views

Renumbering vertices in a 3D mesh

I'm just guessing if there is any room for improving performance on this code: ...
1
vote
0answers
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 ...
1
vote
0answers
426 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 ...
1
vote
0answers
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 ...