If I had a circle, I'd be happy, and there could be a song in there somewhere. I have an ellipse/Oval that looks like this:
I know R1, r and a. I want to calculate R2. I'm assuming there is a scalar relationship between R1 and R2. Every time I go near any angles I get completely lost. Every time I go near trying to calculate r based on a with radius R1 because I think that might lead to the scalar thing, I get totally lost again. And if I try to calculate angles, again with the lost.
Can someone please help me find R2 based on the rest. Thanks in advance.
Related
I need to solve a problem and I'm really stuck with it, so I want to summon the power of the community to see if anyone has an idea on how to handle it.
I need to create a porous material from a given surface . So, I have a point cloud representing the surface of a cylinder, like the one in the figure, and I need to generate a graph inside it from the points on the surface to be filled with volume. It is mandatory that all the points of the surface are used (some more can be added if necessary), the length of the edges must be an input parameter of the function and the angle between two nodes must always be greater than 45ยบ with respect to the horizontal plane.
My initial idea was to make a while loop that in each iteration creates a random point cloud inside the cylinder between the current z (the current z is the maximum z value of the previous iteration) and the current z + the given edge length. Once this point cloud is created, it joins the surface nodes of the last iteration with the points of this point cloud that satisfy the condition of edge length and angularity. And it continues until the current z is greater than the maximum z of the cylinder surface.
The problem with this idea is that it is not consistent and the results are disastrous. So I would like to ask if anyone has a better idea or if anyone knows if any python libraries could help me. I am currently using networkx and numpy-stl but those are not meant to do what I want. ChatGPT is unable to understant me too :(.
Thank you so much for you time!!
I am trying to save polygon area when a new polygon has been created by the user. I found that there is a function for this purpose - ST_AREA, but when I check if it is calculating correct I find some discrepancies. Here is one example:
This is one polygon which area according to geojson.io is 31.85:
But when I run ST_AREA for the same polygon:
SELECT ST_Area(CONCAT(a.polygon, 'SRID=4326'))*10000 AS area FROM kt_polygons a where polygon_id = 180;
The result is 34.93261884737489. Something more, I am not quite sure why I multiply the result area by 10000.. I just do that because the result seems to be more realistic in that way.
I check some other polygons and the difference is not more than 5, but why this can happen? Any ideas what I do wrong?
I found a solution which helps for my case. When I get the result from ST_Area I multiply it by 9090,91. This coefficient maybe is propriate only for my problem, but you can find if there is dependency between the real areas and the one from ST_Area. If so, you can find your coefficient.
So I have a pretty simple question regarding the size of my data. I am trying to calculate the distance between all sets points (WGS84) in a dataset (56000).
https://www.rdocumentation.org/packages/geosphere/versions/1.5-10/topics/distm
According to the documentation: distm(x,y,fun="") if missing, y is the same as x
mydist<-distm(coordinates(mySpatialObject), fun="distHaversine")
This led me to an Error that y was missing. So I figured I could easily work around this.
distm(coordinates(WeedClim.plot),coordinates(WeedClim.plot), fun="distHaversine")
This leads to not just R:Studio, but my entire computer freezing. I had to to a hard reset twice now and do not want to go through this again, because this is my dissertation and I am afraid of breaking something else in the project XD.
Any ideas/solutions? Is there a better function that gives me a distance matrix from a set of coordinates?
THANKS!
I have a bunch of data points that depict the frequency (no unit) at different times (seconds). I have several of these for different parts of a cell. I need to be able to compute the derivatives of each point in each column for all the data using R. Is this possible? Can someone point me in the right direction?
Please let me know if I am not being specific enough.
Thanks
I am trying to graph a lemniscate in polar coordinates on scilab. Which formula is
rho^2=a^2*cos(2*theta).
The thing is that calculating the square root of certain values will return an imaginary number as the value would be negative.
clear
close
clc
clf
a=3;
theta=[0:((1*%pi)/180):((359*%pi)/180)];
rr=(a*a)*cos(2*theta);
rho=sqrt(rr);
polarplot(theta,rho,2);
Anyways, the program breaks itself when the negative rr values are reached since the square root is not properly defined for them.
All I need is the code to ignore those points and plot the others.
I don't know if this is understandable, but I hope someone do and can help me with this.
Thanks in advance.
You may ignore (e.g. filter out) those points, but there is an even easier solution: use only the real part of your result vector for the plot with real
polarplot(theta,real(rho),2);
You may also assigh it to a new variable if want to use it later:
rhoreal=real(rho);