Tag Info

6

Ok, Xenapior and Reynolds together have the right idea. But the explanation is a bit lacking so here is a image to explain it all and some further musings. First let us start by drawing an image (yes i know that is what they say in school for you to do but nobody does it). From the image we can see that there are 2 equal right triangles $V_2, A, C$ and ... 6 I have implemented the cartesian-to-polar-conversion and have used different interpolation methods: 1) nearest neighbor 2) a subsampling approach, which averages 81 subpixel locations 3) bilinear interpolation The 2nd row in the image below shows detail magnifications of the output for the three approaches: Here is the GLSL shader code for approach 1 ... 5 Imagine that a black dot represents a value of -1 whereas a white dot represents a value of +1. You are looking for the iso-line(s) where each point upon the line is 0. For this example you could either place the iso-lines like on the left or the right: or The difference between the solutions is the value in the center. In the left case we assume 1s ... 5 Your screen isn't 3D, so how do you display 3D objects on it? You need to map 3D coordinates into 2D space. This also explains why your OpenGL code is not behaving how you're expecting it to. Sorry if parts of this answer are things you already know (just trying to be comprehensive). What do the model view and projection matrices do? The model view matrix ... 4 You can use a shear, or equivalently a rotation by 45, scale along one of the axes, rotate back (which is equivalent to the shear which you are looking for). EDIT: On second thought, you don't need to even rotate back unless your circle is marked, since a circle is rotation invariant (if the rotation is around its center). 3 The 2D pipeline involves ... [coordinate transformation terms] Can someone give me the detail differentiation among these? This is something I very recently learned while trying to understand how software handles 3D graphics behind the scenes. I've never encountered these terms in reference to 2D graphics before, but the ideas still apply. 2D graphics are ... 3 the canny algorithm is a great start. it takes a sobel input like so. Computes its gradient. Then depending on the gradient orientation it compares all neighbouring pixels aligned with it. If its a local maximum the pixel remains black otherwise it is set to white. this article will probably explain it a lot better. https://towardsdatascience.com/canny-edge-... 3 as promised, here my answer to your question. As I can't follow your code completely (I spend most of my time implementing my code :D ) I can only explain to you what the last step is. So why do we do interpolation here at all? Well the article already describes well that this piece helps creating a smoother geometry. This works, because we take into ... 2 Straight from the specification of lineTo: If the object's path has no subpaths, then ensure there is a subpath for (x, y). And "ensure that there is a subpath" links to this bit: When the user agent is to ensure there is a subpath for a coordinate (x, y) on a path, the user agent must check to see if the path has its need new subpath flag set. If it ... 2 Picking up from step 2, where you generated line segments to represent individual stitches, I would first suggest that you apply rounded ends to each segment, rather than square ends. I would then convert each segment to an outline, (i.e. each rounded stitch becomes an separate poly-line representing the outer boundary.) For example, suppose you start with ... 2 I would consider the curvature in that case too. If the curvature is small - then it is a flat region - so you can safely remove it - your 4th point for example. If the curvature is large (your 5th point for example), even if the distance is the same, you should most likely leave it alone. I would actually recommend a curvature based method coming before ... 2 Writing a 2D render system is a perfectly reasonable thing to do using any of the Graphics API's that you listed. Triangles are the basic medium of all the popular graphics API's so learning to work with, and manipulate triangles whether it is in 2D or 3D is one of the big hurdles to getting a render system up and running. OpenGL tends to be the most popular ... 2 Why are wireframes used? Games don't really use wireframes much, but they might be useful for HUD items etc. Asset creators, designers and engineers use wireframes to see whats inside objects. TO clarify the edged between elements or to preview unimportant aspects. Image 1: Different 3D views (click to zoom) Engineers and Architects also may have very ... 2 Regarding wireframes as an edge list. Wireframe models are used in engineering and CAD they provide several benefits. The Wikipedia page you linked has some benefits, this AutoCAD page has some more. Wireframe are used less in games and movies since they are generally more concerned about the visuals and wireframes are more concerned about design (form over ... 1 The usual method is to just draw over the circle with your lines. The clock is behind the minute hand and the minute hand is behind the hour hand so the drawing order would be. Draw the clock face, then draw the minute hand, then draw the hour hand. This is the basic idea behind Z buffering. Drawing the lines is basically the same idea as the circle, just ... 1 There is in fact a way to avoid this effect and it is outlined by the NYQUIST sampling theorem - which states that the sampling rate should be at least twice as high as the maximum frequency of the function of interest. In this case where cos(a * t) is the function of interest, the frequency is a/(2*pi) - therefore your sampling rate should be greater than ... 1 Since homography is not my topic, I can't really tell if I am missing some important edge cases, but after some research, I think I got the basics. I will use the same variable names, the guy in the video uses on slide 15 (slide numbers are in the bottom right corner on the red background). You start by defining 4 points in the planeX$where you say you ... 1 The mistake was in the multiplication order during the composition of the matrices. Since the OP was working with column vectors the correct order for transformations should have been$TRSA∗v$. The OP did the other way around,$ASRT*v$thus the incorrect results. Also there need to be another$A^{\prime}$matrix added which negates the translation done by ... 1 To get a proper circle, you can use a transformation matrix to transform your cell coordinates into equally spaced cartesian coordinates. In the case of your 50 x 100 pixel cells, your transformation matrix would probably either double the width or halve the height. So something like this: | 0.5 0.0 | | 0.0 1.0 | If you want to draw a circle of radius r at ... 1 The cut length from the vertex is x*ctan(t/2), where t is the angle at this vertex. 1 Since you're working on CAD software, you probably want some precise results. Here an algorithm that could work: For each side: Compute the segment's equation. Compute each round corner's circle equation. Compute the intersections between the segment and each circle. The 2 intersection points are the new endpoints for the line segment. This doesn't handle ... 1 Vanishing points are "points at infinity" in projective geometry, which are represented by$w = 0$in homogeneous coordinates. You can construct the vanishing point of a ray or line by taking its$xyz$direction vector and adjoining$w = 0\$. (For a line, use the direction vector and its negation to get vanishing points in both directions.) Then you can ...

1

There is no general algorithm for packing problems. Only some of the special cases have known, and optimal, solutions. If you are packing one shape then finding a reasonable solution is possible. Like the known cases of hexagonal packing etc. However, if you have multiple diffenently sized objects then easy just flew out of the door. Some heurestics have ...

1

The first step in your existing code calculates the orientations of one line segment relative to each of the two end points of the other line segment, using the cross product. This allows testing whether the other line segment has one end point anticlockwise and the other end point clockwise from the first line segment, indicating that the line on which the ...

Only top voted, non community-wiki answers of a minimum length are eligible