Stokes' paradox

From formulasearchengine
Revision as of 10:55, 11 December 2013 by en>John of Reading (Typo/general fixing, replaced: the the → the, typo(s) fixed: , → , using AWB)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Multiple issues

Template:Userspace draft

Using the Rytz’s axis construction, it is possible to find the major and minor axis and the vertices of an ellipse, starting from two conjugated diameters. Rytz’s construction is a classical construction of Euclidean geometry, in which only compass and ruler are allowed as aids. The design is named after its inventor David Rytz of Brugg, 1801–1868.

Problem statement

Figure 1: Given sizes and results

Figure 1 shows the given and required quantities. The two conjugate diameters , and (blue) are given, and the axes and of the ellipse (red) are required. For clarity, the corresponding ellipse is also shown, however, it is neither given, nor is it a direct result of Rytz's construction. With ruler and compass only a few points of the ellipse can constructed, but not the entire ellipse. Methods of drawing an ellipse usually require the axes of the ellipse to be known.

Conjugate diameters

An ellipse can be seen as an image of the unit circle under an affine transformation.

Figure 1 shows the ellipse next to the unit circle . The affine image , which transforms the unit circle into the ellipse is indicated by the dashed arrows. The preimage of an ellipse diameter under the image is a circle of diameter .

Construction

Figure 2: Construction

Figure 2 shows the steps of the Rytz’s construction. The conjugated diameters and (thick blue lines) are given, which meet at the center of the ellipse. A point on each conjugate diameter is selected: on and on . The angle is either obtuse () as shown in the figure, or acute (). If the conjugated diameters are standing perpendicular to each other (), the axes of the ellipse are already found: In this case, they are identical to the given conjugated diameters.

In the first step, the point is rotated around the center toward point . The result is the point . The points and define the line . The midpoint of the line is . The next step is drawing a circle around so that it passes through the center of the ellipse. The intersections of the circle with the line define the points and . and are selected such that is located on the same side as and is located on the same side as , as viewed from the point . Next, you draw from the point two straight lines, one through and the other through . These lines intersect at a right angle (as Thales' theorem states).

The proposition of the Rytz’s construction is that the directions of the ellipse axes are indicated by the vectors and , and the length of the line is the length of the ellipse’s major axis and the length of the corresponds to the length of the ellipse’s minor axis. In the last step we therefore propose two circles around with the radii and . The major vertices and are at a distance of on the line through and the minor vertices and are at a distance of on the line through .

Algorithm

The following Python code implements the algorithm described by the construction building steps. Template:Collapse top

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np
from cmath import rect


class Ellipse(object):
    """
    Ellipse curve on the complex plane
    """
    def __init__(self, a, b, angle=0, origin=0):
        self.a = a
        self.b = b
        self.angle = angle
        self.origin = origin

    @classmethod
    def from_conjugate_diameters(cls, para):
        """
        Find the major and minor axes of an ellipse from a parallelogram 
        determining the conjugate diameters.
        
        Uses Rytz's construction for algorithm:
        http://de.wikipedia.org/wiki/Rytzsche_Achsenkonstruktion#Konstruktion
        """
        c = midpoint(para[0], para[2])
        para = para - c
        u, v = para[:2]
        if is_orthogonal(u, v):
            return cls(np.abs(u), np.abs(v), np.angle(u), c)
        
        # Step 1
        ur = rotate_towards(u, v, 0.25)
        s = midpoint(ur, v)
        
        # Step 2
        r = rect(np.abs(s), np.angle(ur - s)) + s
        l = rect(np.abs(s), np.angle(v - s)) + s
        
        a = np.abs(v - r)
        b = np.abs(v - l)
        
        return cls(a, b, np.angle(l), c)


def is_orthogonal(a, b, c=0):
    """
    Return true if two complex points (a, b) are orthogonal from
    center point (c).
    """
    return np.abs(np.angle(a - c) - np.angle(b - c)) == np.pi / 2


def midpoint(a, b):
    """
    Midpoint is the middle point of a line segment.
    """
    return ((a - b) / 2.0) + b


def rotate_towards(u, v, tau, center=0):
    """
    Rotate point u tau degrees *towards* v around center.
    """
    s, t = np.array([u, v]) - center
    sign = -1 if (np.angle(s) - np.angle(t)) % pi2 > np.pi else 1
    return s * (-np.exp(pi2 * 1j * tau) * sign) + center

Template:Collapse bottom

References

  • 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534
  • 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

de:Rytzsche Achsenkonstruktion