Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begin_shape('POINTS') does not draw points #186

Closed
ziyaointl opened this issue Jun 20, 2020 · 3 comments · Fixed by #242
Closed

begin_shape('POINTS') does not draw points #186

ziyaointl opened this issue Jun 20, 2020 · 3 comments · Fixed by #242
Assignees

Comments

@ziyaointl
Copy link
Member

Describe the bug
begin_shape('POINTS') does not draw points

To Reproduce

from p5 import *

def draw():
        begin_shape('POINTS')
        vertex(30, 20)
        vertex(85, 20)
        vertex(85, 75)
        vertex(30, 75)
        end_shape()

if __name__ == '__main__':
        run()

Expected behavior
For points appear on the screen.

Screenshots
Expected (from Processing Language):
Screen Shot 2020-06-20 at 9 32 05 AM

Actual:
Screen Shot 2020-06-20 at 9 32 24 AM

System information:

  • p5 release (version number or latest commit): 975f07e
  • Python version: 3.8.3
  • Operating system: MacOS 10.15.5
@ziyaointl ziyaointl added the bug label Jun 20, 2020
@ziyaointl
Copy link
Member Author

Maybe we can use p5.circle instead of the OpenGL primitive points. This way we can easily replicate the behavior here: https://p5js.org/reference/#/p5/point

@arihantparsoya
Copy link
Member

arihantparsoya commented Jun 21, 2020

Yes, it would also solve #161

@jeremydouglass
Copy link
Contributor

jeremydouglass commented Jun 21, 2020

Yes, for the vispy / OpenGL renderer I recommend looking closely at how Processing(Java) (not p5.js) implements point(), and what strokeWeight / strokeCap do to a point. With strokeCap() the behavior is different then just mapping strokeWeight to p5.circle() -- see comments on the Processing reference pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants