You are not logged in. Please login at www.codechef.com to post your questions!

×

CIRCLES - Editorial

PROBLEM LINK:

Contest

DIFFICULTY:

HARD

PREREQUISITES:

Circumcenter
Quadratic Equations
Basic Geometry

PROBLEM:

Given two circles in 3 dimensions (denoted using 3 points on each circle) find whether they are entangled or not.

EXPLANATION:

Finding circumcenter of a circle given 3 pts on that circle -> Let three points be A,B,C Now, make two vectors AB(joining A and B) and AC(similarly) ABP -> perpendicular bisectors of AB ACP -> perpendicular bisectors of AC Circumcenter would be meeting point of ABP and ACP

Now translate the axis to center of first circle. Rotate the axis in such a manner that first circle comes in xy-plane. Now get the plane of second circle in the form ax+by+cz=d We can get the line of intersection of this plane with xy plane(plane of first circle) by putting z=0. So now intersecting line becomes ax+by=d; Now first circle is centered at origin in xy plane; So equation of first circle will be x^2 + y^2 = r^2 ; Now we have to find the intersection of this circle and the intersecting line.

We will be getting a quadratic equation on solving this->
1) imaginary roots -> line doesn't intersect the first circle[Not possible]. Two rings can't entangle because plane of second ring doesn’t intersect first(ring in xy plane) ring.

2) equal roots -> first circle intersect plane of second circle at only one point[Not Possible]. We have been given both rings don't touch each other, therefore if first ring only touches the second plane, its not possible to entangle.

3) distinct roots -> Let a,b are the two points that came from solving the equations of first circle and second plane. For entangling two rings -> one point(a,b) should lie inside the second ring and other should lie outside the second ring.

RELATED PROBLEMS:

Amrita '07

CODE

setter.cpp By Sukhjashan Singh

This question is marked "community wiki".

asked 07 Feb '14, 06:12

darkshadows's gravatar image

5★darkshadows ♦
3.0k93164187
accept rate: 12%

edited 12 Feb '14, 03:29

admin's gravatar image

0★admin ♦♦
19.8k350498541

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×15,680
×1,343
×637
×9

question asked: 07 Feb '14, 06:12

question was seen: 3,021 times

last updated: 12 Feb '14, 03:29