Git Product home page Git Product logo

Comments (15)

SimonDanisch avatar SimonDanisch commented on June 25, 2024

Is N very big? Because then the points would be outside the window area...

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

It is small, N=10

Defining this function

function plot(m)
    srand(17)
    w, r = glscreen()
    @async r()
    s = Vec2f0(50)
    N = 10
    v_pos = Point2f0[Point2f0((N*s[1]*rand(2))...) for i=1:N]
    v_img = HyperSphere(Point2f0(0), 30f0)
    vis_nodes = visualize((v_img, v_pos), :lines, scale=s)
    view(vis_nodes, method=:orthographic_pixel)

    # m used here
    v = visualize(v_pos[1:m], :lines, scale=s)

    view(v, method=:orthographic_pixel)
end

I obtain

plot(5)
glvisualize_005

plot(4)
glvisualize_007

plot(3)
glvisualize_008

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

I guess your problem is that the primitives are not centered?
I should have fixed this in a newer commit, if you dare to checkout.
Also, when given a primitive with dimensions, you don't need to supply the scale!
In the newer commit, you can define the centering yourself. With the circle, it's centered at the middle point.

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

Oh yes, that was a problem, but the real problem is that with plot(3) I was expecting to see two segments

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

Ah yeah... That's actually what I wanted to work on today. That's a peculiarity of OpenGL and I want to make a proper work around and fix another issue while at it (being able to add a list of indexes and specifying which points are connected). The only work around you can use right away is, to never have less than 4 points...
There is this annoying temporary fix:

a,b = points 
ab = b-a
points = vcat(a-(ab*0.00001f0),a,b,b+(ab*0.00001f0)) #start and end have to be slightly different

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

ok thanks.

As an alternative, there is a way to visualize types from GeometryTypes.jl, like LineSegment?

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

(being able to add a list of indexes and specifying which points are connected).

that's exactly what I need to visualize a graph

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

Well, that's basically what I will be implementing.

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

Great! I can't promise anything, but I'm working on it ;)

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

Okay I fixed the line endings and made a step forward towards the segments ;) I just need to integrate a few changes into the rest of the infrastructure to make it work for the generic case.

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

nice!

still some sprites' offset after last patches
glvisualize_001

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

uh...have you removed scale=s ?

from glvisualize.jl.

CarloLucibello avatar CarloLucibello commented on June 25, 2024

ouch, right, sorry, it works perfectly!

from glvisualize.jl.

musm avatar musm commented on June 25, 2024

@SimonDanisch
Any idea why I keep getting this?
julia julia> Pkg.checkout("GeometryTypes", "sd/typealias") INFO: Checking out GeometryTypes sd/typealias... WARNING: Cannot perform fast-forward merge. INFO: Pulling GeometryTypes latest sd/typealias... WARNING: Cannot perform fast-forward merge. INFO: No packages to install, update or remove

from glvisualize.jl.

SimonDanisch avatar SimonDanisch commented on June 25, 2024

that's a julia/github issue. Sometimes it helped to first do Pkg.checkout("GeometryTypes", "master").
You can also try doing it manually. Just go into the GeometryTypes folder with your terminal and type:

git checkout sd/typealias

You might need to throw in a:

git reset --hard HEAD

If there have been changes in the sources.

from glvisualize.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.