Makie.jl: Document camera controls

Created on 16 May 2019  路  2Comments  路  Source: JuliaPlots/Makie.jl

cam = cameracontrols(scene)

AbstractPlotting documentation help wanted

Most helpful comment

I don't know almost anything about it but let's start: On basics put a new section:

3D Camera

To force a plot to be visualized in 3D use the attribute limits with a nonzero z-axis interval.
Example: limits = HyperRectangle{3,Float32}([0,0,0],[1,1,1])

Use the camera given by campixel!(scene) to add a plot that looks like a 2D plot from the user perspective (it generatets a subscene with an orthographic view aligned to pixelspace)
For not modifing the camera view while plotting use the attributeraw=true.

Camera controls configuration can be customized by setting the fields of cam = cameracontrols(scene):

  • pan_button: The mouse button used for panning.
  • rotate_button: The mouse button used for rotating the camera.
  • translationspeed: This parameter allows to customize the panning speed.
  • rotationspeed: This parameter allows to customize the camera rotation speed
  • move_key

The other fields are for camera positioning, the camera needs to be updated after changing these:

  • lookat: The camera is directed at this point.
  • eyeposition: The camera is at this point.
  • upvector: The camera up direction follows this vector (normalized internally)
  • fov: Field of view of the camera (not used for zooming internally)

Remaining fields:

  • near
  • far
  • projectiontype (perspective, orthographic)

Example: cam.rotationspeed[]=0.05

All 2 comments

ping @Smldis

I don't know almost anything about it but let's start: On basics put a new section:

3D Camera

To force a plot to be visualized in 3D use the attribute limits with a nonzero z-axis interval.
Example: limits = HyperRectangle{3,Float32}([0,0,0],[1,1,1])

Use the camera given by campixel!(scene) to add a plot that looks like a 2D plot from the user perspective (it generatets a subscene with an orthographic view aligned to pixelspace)
For not modifing the camera view while plotting use the attributeraw=true.

Camera controls configuration can be customized by setting the fields of cam = cameracontrols(scene):

  • pan_button: The mouse button used for panning.
  • rotate_button: The mouse button used for rotating the camera.
  • translationspeed: This parameter allows to customize the panning speed.
  • rotationspeed: This parameter allows to customize the camera rotation speed
  • move_key

The other fields are for camera positioning, the camera needs to be updated after changing these:

  • lookat: The camera is directed at this point.
  • eyeposition: The camera is at this point.
  • upvector: The camera up direction follows this vector (normalized internally)
  • fov: Field of view of the camera (not used for zooming internally)

Remaining fields:

  • near
  • far
  • projectiontype (perspective, orthographic)

Example: cam.rotationspeed[]=0.05

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mschauer picture mschauer  路  4Comments

daviehh picture daviehh  路  3Comments

phlavenk picture phlavenk  路  6Comments

utotch picture utotch  路  4Comments

asinghvi17 picture asinghvi17  路  5Comments