74 lines
1.3 KiB
Markdown
74 lines
1.3 KiB
Markdown
---
|
|
id: 5900f4621000cf542c50ff75
|
|
challengeType: 5
|
|
title: 'Problem 246: Tangents to an ellipse'
|
|
---
|
|
|
|
## Description
|
|
<section id='description'>
|
|
A definition for an ellipse is:
|
|
Given a circle c with centre M and radius r and a point G such that d(G,M)<r, the locus of the points that are equidistant from c and G form an ellipse.
|
|
|
|
The construction of the points of the ellipse is shown below.
|
|
|
|
|
|
|
|
|
|
|
|
Given are the points M(-2000,1500) and G(8000,1500).
|
|
Given is also the circle c with centre M and radius 15000.
|
|
The locus of the points that are equidistant from G and c form an ellipse e.
|
|
From a point P outside e the two tangents t1 and t2 to the ellipse are drawn.
|
|
Let the points where t1 and t2 touch the ellipse be R and S.
|
|
|
|
|
|
|
|
|
|
For how many lattice points P is angle RPS greater than 45 degrees?
|
|
</section>
|
|
|
|
## Instructions
|
|
<section id='instructions'>
|
|
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: <code>euler246()</code> should return 810834388.
|
|
testString: assert.strictEqual(euler246(), 810834388, '<code>euler246()</code> should return 810834388.');
|
|
|
|
```
|
|
|
|
</section>
|
|
|
|
## Challenge Seed
|
|
<section id='challengeSeed'>
|
|
|
|
<div id='js-seed'>
|
|
|
|
```js
|
|
function euler246() {
|
|
// Good luck!
|
|
return true;
|
|
}
|
|
|
|
euler246();
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
```js
|
|
// solution required
|
|
```
|
|
</section>
|