Download presentation
Presentation is loading. Please wait.
1
Practice Contest II Problem H: Two Rings
Problem Created by: Kitamura Solved by: Kitamura, Hirano Statement by: Kitamura, Sakuraba
2
The Problem The Problem: Find the coordinates of two rings on a unit sphere This problem requires hand calculation rather than tough coding There are some ways to solve the problem; the solution shown here is just one example
3
Basic Idea of the Solution
Find the plane on which a ring is Let two planes be P1 and P2 Find the intersection line of P1 and P2 Let the line be L Find the intersection point of L and a unit sphere
4
Coordinate Conversion
θ [NS] φ [EW] → (x, y, z) z = sz * sinθ sz = +1 if [NS] = N, -1 if [NS] = S x = cosθcosφ y = sy * cosθsinφ sy = +1 if [EW] = E, -1 if [EW] = W
5
Find the Planes P1 and P2 Equation of a plane: a(x - x0) + b(y - y0) + c(z - z0) = 0 where: Normal vector N = (a, b, c) Point on the plane P = (x0, y0, z0) We can calculate the equations of P1 and P2 using this formula
6
Find the Intersection Line of P1 and P2
Let the equations of P1 and P2 be: P1: a1x + b1y + c1z + d1 = 0 P2: a2x + b2y + c2z + d2 = 0 The intersection line L can be expressed as: p + tv = 0 (t: parameter) v is the cross product of two normal vectors: v = (a1, b1, c1)×(a2, b2, c2) Let v be (vx, vy, vz)
7
Find the Intersection Line of P1 and P2 (Cont'd)
If v = 0, there are no intersection line (two planes are parallel) If vx≠0, L passes through a point p1 = (0, y1, z1) y1 = (c1d2 - c2d1) / vx z1 = (b1d2 - b2d1) / (-vx) If vy≠0, L passes through a point p2 = (x2, 0, z2) If vz≠0, L passes through a point p3 = (x3, y3, 0) Choose p1, p2 or p3 as p
8
Find the Intersection Points of L and the unit sphere
We have to find the value of t The distance between an intersection point and the origin is 1; || p + tv || = 1 ⇔ || p + tv ||2 = 1 This is the quadratic equation of t
9
The Final Step (x, y, z) → θ [NS] φ [EW]
Reverse function of the previous conversion Be careful in using asin and acos Value range Precision
10
Judge Status 1 solved / 1 submission First accept: Wx (162 min.)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.