Skip to content

Add {Plane,Cone}.from_points() methods #9

Description

@egpbos

Inspired by the NormalDist.from_samples() syntax, I think it would be nice if the shape classes could have constructors that take a point set as input, fit to that point set, and use the best fitting parameters to make the new shape. It would look like this:

from numpy.random import random, normal
from ectopylasm import Plane

N = 1000
xyz = (random(N), random(N), normal(0, 0.01, N))

plane = Plane.from_points(xyz)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions