What is the algorithm for storing the pixels in an oval in Javascript?
How would one draw an oval in JS? ...
How would one draw an oval in JS? ...
Let's say I have 3 point clouds: first that has 3 points {x1,y1,z1}, {x2,y2,z2}, {x3,y3,z3} and second point cloud that has same points as {xx1, yy1, zz1}, {xx2,yy2,zz2}, {xx3,yy3,zz3}... I assume to align second point cloud to first I have to multiply second one's points by T[3x3matrix]. 1) So how do I find this transform matrix(T) ? ...
I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the horizon points XYZ of the horizon points See the image below. ...
I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the 2 horizon points XYZ of the 2 horizon points Note: I got a solution the last time I asked this question, but it only found the extrema of the c...
below are a whole length of code i have copied from NEHE Production (Lesson 25).. i was just trying to play around but seem to not able to change/convert each points into a individual spheres nor cylinder.. somehow when i did my adjustment they are not arranged in the way they are suppose to and they won't rotate.. i planed to add light ...
I've created a mutable array containing NSRect values. I want to check whether the NSPoint I created is within this rectangle. What is the best way to do this in cocoa. ...
Given a set of N-dimensional integer points how do I find the smallest set of N-dimensional cuboids (rectangles in the 2-d case), such that an integer point is in the set of integer points if and only if it's contained in one or more of the cuboids/rectangles. Integer point means a point with integer coordinates. e.g. given the points (...
I have a question i know a line i just know its slope(m) and a point on it A(x,y) How can i calculate the points(actually two of them) on this line with a distance(d) from point A ??? I m asking this for finding intensity of pixels on a line that pass through A(x,y) with a distance .Distance in this case will be number of pixels. ...
I have a NSArray of points that make up a path. I can detect when it self-intersects. When this happens, I try to fill the path. First I used CoreGraphics, now I'm using openGl to draw a triangle array. Doesn't work well as you can see in the image. How do I fill only the circular area while leaving the "tail" alone? I was thinking of...
Is there an algorithm that will, if given two nodes on a graph, find a route between them that takes the specified number of hops? Any node can be connected to any other. The points at the moment are located in 2D space, so I'm not sure if a graph is the best approach. ...
I could compute the distance between each point and take the largest but that doesn't sound like a very efficient way to do it when there are a large (> 1000) number of points. Note: This is for iPhone so I don't have a ton of processing power. ...
I'm looking to implement a reputation-based point system for a QA site. I like Stack Overflow's model, but I was wondering if there's anything else like this out there. I was doing some research on the web, but couldn't find a good compiled list of reputation models. If there's a study of reputation models with pros and cons, that would ...
Hi guys! I'm making a quiz in Actionscript 2.0. The quiz has 8 questions. Each question has four answers and each answer gives different points. On every frame their is two questions to answer and then move on to the next two and so on. My problem is that I need to assign each answer with points that in the end will be calculated and d...
Hi, I have a set of points and I need to convert the set to (non-overlapping) triangles (or a big polygon if equivalent)... The application: I have a list of locations (latitude,longitude) from a country, and I need to find if a given point is inside the counrty or not... X X *---------* ...
For some reason it seems that everyone writing webpages about Poincare discs is only concerned with how to represent lines and measure distances. I'd like to morph a collection of 2D points (as defined by x,y coordinates in the Euclidian plane) onto a Poincare disc, but I have no idea what the algorithm is supposed to be like. At this p...
Hello, I have problem optimizing drawing Google-like map. It works OK for hundreds of points, but when it comes to larger amounts like thousands it gets fuzzy and slow. Also unzoomed it looks weird. I'd like to know how to optimize drawing algorithm to draw fewer places so it looks like unzooming on Google Maps. However I also draw lin...
Hello, I have a polyline in WPF, which contains some points. When the user clicks on a segment line it should drag the whole poly. when the user clicks on a single "knot" or point of the structure, it should be possible to drag only that point, reconfiguring the shape. I've been able to detect when the user clicks on a segment. I am try...
I have a table, called Level. id | level | points(minimum) ------------------------- 1 | 1 | 0 2 | 2 | 100 3 | 3 | 200 Let say I have 189 points, how do i check which level the user in? EDIT: Best answer chosen. Now I am comparing the request by adding EXPLAIN before the SELECT query, i have this r...
Hi, I have a set K of randomly selected pixels in a 2D image. For every other pixel in the image I need to find out which pixel in set K is closest to it (using the standard sqrt(dx^2 + dy^2) measure of distance). I am aware that there may be more than one solution for each pixel. Obviously it can be done by brute force against every pi...
Hello, Is there a way to select the control points automatically in Matlab instead of manually selecting them by cpselect? Thank you very much. ...