curve

Find area of overlap between two curves

陌路散爱 提交于 2021-01-28 19:11:59
问题 I've been struggling to find a solution to find the area of overlap between two curves. I'm not dealing with probability density functions with known parameters but curves obtained from smoothing of empirical data points. The only hint I found is to calculate the area that is not over-lapping as in this code (from here): x <- seq(-6,6,by = 0.01) y1 <- dnorm(x,0,1) y2 <- pnorm(x,1,1.1) f1 <- approxfun(x, y1-y2) f2 <- function(z) abs(f1(z)) dif <- integrate(f2, min(x), max(x)) plot(x,y1,type="l

A way to curve (outside) an element in CSS3

自闭症网瘾萝莉.ら 提交于 2021-01-28 18:30:30
问题 I'm trying to curve an element and then add a background-image property in it. I was looking on this question - Is there a way to curve an element?. The only difference, is that I want it to be curved outside . Here's an example: This is what I tried to do: http://jsfiddle.net/KcmfC/1148/ The problem in this result is that it's too much curved. I can't find any solution for this. #test { background: url('http://www.planwallpaper.com/static/images/i-should-buy-a-boat.jpg') repeat center center

How to project two point line on the map into a curved line OpenLayers

人盡茶涼 提交于 2021-01-27 20:14:35
问题 As for my knowledge, there is no built-in feature in OpenLayers to project the straight line of two points into curved line following the curvature of the Earth. This was a problem when I got a route that was going straight through Madagascar: Is there any solution on the frontend for this problem, any feature that I missed in OpenLayers, or is there any third-party solution to calculate this. I know that this kind of calculation is hard on the frontend, and it also depends on the resolution

Python. How to get the x,y coordinates of a offset spline from a x,y list of points and offset distance

北城余情 提交于 2021-01-20 20:10:05
问题 I need to make an offset parallel enclosure of an airfoil profile curve, but I cant figure out how to make all the points be equidistant to the points on the primary profile curve at desired distance. this is my example airfoil profile this is my best and not good approach EDIT @Patrick Solution for distance 0.2 回答1: You'll have to special-case slopes of infinity/zero, but the basic approach is to use interpolation to calculate the slope at a point, and then find the perpendicular slope, and

Python. How to get the x,y coordinates of a offset spline from a x,y list of points and offset distance

穿精又带淫゛_ 提交于 2021-01-20 20:07:26
问题 I need to make an offset parallel enclosure of an airfoil profile curve, but I cant figure out how to make all the points be equidistant to the points on the primary profile curve at desired distance. this is my example airfoil profile this is my best and not good approach EDIT @Patrick Solution for distance 0.2 回答1: You'll have to special-case slopes of infinity/zero, but the basic approach is to use interpolation to calculate the slope at a point, and then find the perpendicular slope, and

How to create bezier curves for an arc with different start and end tangent slopes

大憨熊 提交于 2020-07-14 05:18:22
问题 I've been stuck on this for a week now i can't seem to solve it. I have an arc which i can convert to a series of bezier curves quite easily when the arc is flat: But i am struggling to work out how to find the bezier curves when the arc is a helix and the end tangents have different slopes. This is as far as i have gotten so far: As you can see each bezier curve has control points that are not on the right plane, and the start and end tangent (the red vectors in the second image) of the full

How to create bezier curves for an arc with different start and end tangent slopes

徘徊边缘 提交于 2020-07-14 05:14:33
问题 I've been stuck on this for a week now i can't seem to solve it. I have an arc which i can convert to a series of bezier curves quite easily when the arc is flat: But i am struggling to work out how to find the bezier curves when the arc is a helix and the end tangents have different slopes. This is as far as i have gotten so far: As you can see each bezier curve has control points that are not on the right plane, and the start and end tangent (the red vectors in the second image) of the full

Plot ROC curve and calculate AUC in R at specific cutoff info

僤鯓⒐⒋嵵緔 提交于 2020-03-02 06:58:48
问题 Given such data: SN = Sensitivity; SP = Specificity Cutpoint SN 1-SP 1 0.5 0.1 2 0.7 0.2 3 0.9 0.6 How can i plot the ROC curve and calculate AUC. And compare the AUC between two different ROC curves. In the most of the packages such pROC or ROCR, the input of the data is different from those shown above. Can anybody suggest the way to solve this problem in R or by something else? ROCsdat <- data.frame(cutpoint = c(5, 7, 9), TPR = c(0.56, 0.78, 0.91), FPR = c(0.01, 0.19, 0.58)) ## plot