Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
There is a function of a 2D geometrical shape and 1D interval,
f(s, i) = Py (s ⋂ i×(-∞,∞))
It calculates intersection of shape with infinite vertical rectangle (determined by given interval i = [x1, x2)) and then projects it to Y axis.
Is there a good name for this function?
GetIntersection seems like an obvious candidate...
If you don't like Blindy's answer maybe you can call it:
ProjectoToYAfterIntersectingInfiniteRectangle(x1,x2)
But I would go with just GetIntersection as Blindy said +1
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to solve the following problem:
Give a linear-time algorithm to determine if a text T is a cyclic rotation of another string T'. For example, arc and car are cyclic rotations of each other.
I have no idea where to start. How can I solve this problem?
As a hint: if x and y have the same length, then x is a cyclic rotation of y iff x is a substring of yy. Try proving this and using this as the basis for your algorithm.
Hope this helps!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have several variables with monthly stock returns like qqqret, gldret,spyret. I would like to create a stacked histogram or dotplot of them all on the same scale. any ideas how?
thanks!
ps. if i stack my vectors on top of each other and create an indicator variable for each one I could use strip plot. but i want to be able to say something like "hist qqqret gldret spyret"
dotplot supports a varlist: see the help.
stripplot (SSC) is an alternative.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
The points are in a plane,marked with two numbers indicating coordinates.give out a connect sequence.
Take the convex hull. If it is a quadrilateral, you are done. If it is a triangle, you can break any of its edges apart to include the inner point.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a list of points (x/y each in one column) and need to determine the maximum distance of any combination of pairs of points.
I'm only interested in the distance not the pair of points itself.
Right now I use a rough upper boundary estimation by calculating the length of the vector
(max(x)-min(x), max(y)-min(y))
You could try using CTRL+SHIFT+ENTER:
=MAX((x-TRANSPOSE(x))^2+(y-TRANSPOSE(y))^2)^0.5
Also see: http://newtonexcelbach.wordpress.com/2010/11/27/maximum-distance-between-two-points/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
It seems I completely forgot geometry :-( It looks like a simple. I need it for my flash game.
I drawn it in Carmetal program:
I need coordinates of C(x,y). Please help me to find a solution.
You can stick with simple trig...
Here, the blue line length is (By - Ay). So the angle at B is acos((By - Ay) / AB). Subtracting that angle from the angle ABC, you find the angle at B in the larger triangle. Knowing the length BC and that angle, you can calculate the length of the brown line with
l1 = BC/sin(small_angle)
Similarly, the length of the blue and red lines together is
l2 = BC/cos(small_angle)
And C is (Bx + l1, By - l2).