I have a set of coordinates with associated altitudes in Google Earth Pro. Is there any way to remove all of the sharp kinks created by the straight line joins and create a smooth, curved line that passes through the coordinates defined?
Related
I tried to create this very unique shape in swift a long time ago but failed. My goal is to draw a shape like in this image here (I mean the darker shape in that image).
How can you create such a unique shape in Swift?
As Alexander says, it looks like that shape would be pretty easy to create using Bezier curves.
I'd suggest opening that image in a program like Photoshop that offers a Bezier path drawing tool and trying to recreate it there. Once you have the control points that get you the shape you are after, you can write down their coordinates and recreate them using a UIBezierPath in iOS.
A cubic bezier path has 2 end points and 2 middle control points. The curve moves from the starting point to the ending point, and gets pulled towards the first middle control point first, and then pulled towards the second control point. You can create a wide variety of curves that have 2 "humps" in them with a single Bezier curve, and you can chain multiple Bezier curves together to create more complex shapes. If you arrange the control points for connecting Bezier curves correctly you can get curves that transition smoothly from one to the next. With a different arrangement of the control points between Bezier curves, you can create sharp corners between curves.
I suggest you google Bezier curves, and do some experimenting.
I'm not particularly good with the path tool in Photoshop, but I got pretty close with a few minutes tinkering. here is a screen-shot:
I'm trying to programatically "draw" a circle with multiple Marker with React leaflet.
I'm doing it with cosinus and sinus trying to calculate theirs coordinate from the center point ...
But the more I'm near the pole the more the circle is an ellipssis ... Is it a way to transform the calculus to take this into account ?
In this example I'm in Oulu (near the pole) If you just change the x var into '0' you'll notice that the markers are now in circle !
please see this CodePen
Because a Leaflet map is a projection of a sphere onto a flat map, distortions will happen near the poles. You want to project your spherical Lat/Lng into flat Points, calculate the marker placements in flat Points and then unproject the points back to spherical LatLng.
i have loaded a stl file of a turbine blade into Matlab by using the STLreader. I got the coordinates of all points on the surfaces of the stl model by using the trisurf command (airfoil and foot of the blade). Now I want to focus on the suction sided coordinates of the airfoil. Therefore, I excluded the points of the blade foot by using the location of the Z-coordinates of the points. Now I want to exclude all points of the airfoil that aren't part of the suction side by using the X- and Y-coordinates of the points but I don't know how to do it. An image is attached to show my problem. I have tried the coordinatetransformation to rotate the X-Y-plane to say that all point with Y smaller than zero are deleted but it doesn't work well because of the curve of the airfoil. I always cut to much or not enough points.
Hopefully, someone can help me.
Yours
Tobias
turbine blade picture
I'm using canny edge detection to detect the edges of a rope and eliminate the background, then using morphological filters I'm filling these edges then thinning them to be in pixel size. The plot indicates the xy coordinates of the rope. What I need to do is to get the intersection of the scattered data (blue *) with the red circle (get the coordinates of Points (1,2,3,4).
Then I need to get the whole points coordinates from the point of intersection (point1,2,3,4) to the center,grouped as A,B,C,D.
The center of the circle, the origin of the axes, and the radius are all known.
I've tried some Matlab functions to get the four intersections points like
InterX,intersections
and also I tried to manually find the intersections
idx=find(y1-y2<eps);
but no method gives me the 4 intersection points.
Thank you in Advance
You'll need a thick circle. I presume (from your previous question) that the rope points are at contiguous integer coordinates. Using a thick circle (donut) with a width of 1 ensures you'll find at least one point in each rope end. Connected component analysis will then tell you which of these points belong to the same rope end.
I'm trying to find a way to rotate an arbitrary polygon around its own geometric center. It was drawn in a blackboard built with creating js.
I've been trying many approaches, but any of them has worked.
How can I accomplish it?
Find the geometric centre as the average of all the points' coordinates. Make all the points relative to this centre (such that the centre is (0,0)), then rotate them by the desired angle using a rotation matrix. You can then draw using these points.
This is assuming you have the coordinates of all the points.