Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

bug in 2d visualization #46

@CarloLucibello

Description

@CarloLucibello

I obtain a weird result when trying to visualize multiple 2d points, as in

    w, r = glscreen()
    s = Vec2f0(100)
    N = 10
    points = Point2f0[rand(Point2f0, -10f0:eps(Float32):10f0) for x=1:N]
    # points = Point2f0[Point2f0(x,0f0) for x=-10f0:0.1f0:10f0]
    v = visualize(points, scale=s)
    view(v)
    r()

The resulting render is a single point in the bottom left corner of the window:
glvisualize_001

The same happens when running the testsuite, except for two cases,

push!(TEST_DATA2D, visualize(particle_robj[:positions], scale=s, color=particle_color, style=Cint(OUTLINED), shape=Cint(ROUNDED_RECTANGLE)))

and

curve_data(i) = Point2f0[Point2f0(sin(x/i)*250, x) for x=1:1024]
push!(TEST_DATA2D, visualize(const_lift(curve_data, bounce(20f0:0.1f0:1024f0)), :lines))

which are displayed correctly

Cheers,
Carlo

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