Skip to content

Point3D encapsulation of knowledge #101

Open

Description

@Jones-Adam

Propose to remove the IntersectionOf, MirrorAbout, ProjectOn methods from Point3D.

These methods require that the fundamental type point should have knowledge of higher order structures like Ray and Plane. Structurally these methods are better placed on the higher order classes rather than point3D

Activity

  1. RiSearcher commented on Dec 10, 2017

    @RiSearcher

    How do you plan to distinguish between Point.MirrorAbout.Plane and Plane.MirrorAbout.Point?

  2. Jones-Adam commented on Dec 10, 2017

    @Jones-Adam
    ContributorAuthor

    I understand finding the mirror of a point on the opposite side of a plane. For which I would expect its signature to be myplane.MirrorPoint(Point3D point);

    What would mirroring a plane about a point mean? a point doesn't have an opposite side, so I'm not quite following what this should be understood as?

  3. RiSearcher commented on Dec 10, 2017

    @RiSearcher

    Reflection operation could be performed about point, line or plane. And it is three different operations.
    Reflection about point also called central inversion.

  4. Jones-Adam commented on Dec 10, 2017

    @Jones-Adam
    ContributorAuthor

    Thanks didn't know that
    From https://en.wikipedia.org/wiki/Point_reflection

    In three dimensions, a point reflection can be described as a 180-degree rotation composed with reflection across a plane perpendicular to the axis of rotation

    So as I understand it, you would want to do generically

    shape.MirrorAbout(Point3D point)
    shape.MirrorAbout(Line3D line)
    shape.MirrorAbout(Plane plane)
    

    where shape could be a point, a line, a plane, a shape?

    I wonder if this is not better supported by providing matrix transforms rather specific operations per type:

    shape.ApplyTransform(Matrix m)

  5. RiSearcher commented on Dec 10, 2017

    @RiSearcher

    Well, yes. I would expect that good library will support all three methods for every shape. The question is how rich and complete API you plan to support in "Math.NET Spatial".

    Not all reflections can be described through matrix transforms.

  6. Jones-Adam commented on Dec 11, 2017

    @Jones-Adam
    ContributorAuthor

    Well the answer to that has as much to do with people contributing to the library as it does API design. If you want feel free to join us on Gitter https://gitter.im/mathnet/mathnet-spatial.
    Also if you have the time, it would be great if you could put together a list of operations you would expect to be standard on every shape?

  7. RiSearcher commented on Dec 11, 2017

    @RiSearcher

    Usually I provide next methods for every geometrical primitive: translate, rotate about point, reflect about point, line and plane. Scaling (for finite objects) probably would be good too, but I haven't implemented it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions