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 d1, and d2 (blue) are given, and the axes a and b of the ellipse (red) are required. For clarity, the corresponding ellipse e 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 e next to the unit circle kh. The affine image α, which transforms the unit circle kh into the ellipse e is indicated by the dashed arrows. The preimage of an ellipse diameter under the image α is a circle of diameter kh.

Construction

Figure 2: Construction

Figure 2 shows the steps of the Rytz’s construction. The conjugated diameters d1 and d2 (thick blue lines) are given, which meet at the center M of the ellipse. A point on each conjugate diameter is selected: U on d1 and V on d2. The angle (UMV) is either obtuse (>90) as shown in the figure, or acute (<90). If the conjugated diameters are standing perpendicular to each other (=90), 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 U is rotated 90 around the center M toward point V. The result is the point U'r. The points U'r and V define the line g. The midpoint of the line U'rV is S. The next step is drawing a circle t around S so that it passes through the center M of the ellipse. The intersections of the circle with the line g define the points R and L. R and L are selected such that R is located on the same side as U'r and L is located on the same side as V, as viewed from the point S. Next, you draw from the point M two straight lines, one through R and the other through L. These lines intersect M 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 ML and MR, and the length of the line VR is the length of the ellipse’s major axis and the length of the VL corresponds to the length of the ellipse’s minor axis. In the last step we therefore propose two circles around M with the radii a and b. The major vertices S1 and S2 are at a distance a of M on the line through L and the minor vertices S3 and S4 are at a distance b of M on the line through R.

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