Group Abstract Group Abstract

Message Boards Message Boards

0
|
30 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Equations of the sides of a regular octagon inscribed in x² + y² = 2 with four vertices on the axes

Posted 8 hours ago

A regular octagon is inscribed in the circle x² + y² = 2, with four of its vertices lying on the coordinate axes. What are the equations of the lines containing the eight sides of the octagon?

r = Sqrt[2];
angles = Table[\[Theta], {\[Theta], 0, 2 \[Pi] - \[Pi]/4, \[Pi]/4}];
vertices = 
  Table[{r Cos[\[Theta]], r Sin[\[Theta]]}, {\[Theta], angles}];
lines = Table[
  With[{p1 = vertices[[i]], 
    p2 = vertices[[Mod[i, 8] + 
        1]]}, (y - p1[[2]]) (p2[[1]] - p1[[1]]) == (x - 
         p1[[1]]) (p2[[2]] - p1[[2]]) // Expand // Simplify], {i, 1, 
   8}]

The code above is one way to solve the problem using parametric equations in polar coordinates. What other methods could be used?

POSTED BY: Wen Dao
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard