Skip to content

Wrong shape output from "cone" shape in API. #287

@gnmp

Description

@gnmp

Th cone geometry in the API returns a semielipsoidal shape instead of a cone:

Cone(float64, float64) Shape
3D Cone with diameter and height in meter. The top of the cone points in the +z direction. x

The equation in the file shape.go is not the one of a cone: https://github.com/mumax/3/blob/e45ea8b62bc544ec6df67648c1b72a3bbfd4f17f/engine/shape.go

// 3D Cone with the vertex down.

func Cone(diam, height float64) Shape {

return func(x, y, z float64) bool {

	return z >= 0 && sqr64(x/diam)+sqr64(y/diam)+0.25*sqr64(z/height) <= 0.25

}

}

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