Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pixel sizes are scaling poorly when there is a large difference between closest and farthest distance. #898

@Alexboiboi

Description

@Alexboiboi

It is not really a bug, rather a opinionated choice to scale the pixels to the min distance between each pair of pixel. This can be however circumvented by using an explicit size with sizemode="absolute" or we introduce a min size relative to the scene.
To reproduce

import magpylib as magpy

magnet = magpy.magnet.Cuboid(polarization=(1, 1, 0), dimension=(.1,.1,.1))
sens2 = magpy.Sensor(
    pixel=[(0,0,1), (0,0,1.1), (0,0,1)],
)
magpy.show([magnet, sens2], backend='plotly')
Image

Originally posted by @OrtnerMichael in #793 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions