bug in camera
See original GitHub issueIt seems that camera is not updated when viewup is modified but camera position is not changed:
import k3d
import numpy as np
from numpy import sin,cos,pi
from ipywidgets import interact, interactive, fixed
import ipywidgets as widgets
import time
import math
plot = k3d.plot()
plot.camera_auto_fit = False
T = 1.618033988749895
r = 4.77
zmin,zmax = -r,r
xmin,xmax = -r,r
ymin,ymax = -r,r
Nx,Ny,Nz = 77,77,77
x = np.linspace(xmin,xmax,Nx)
y = np.linspace(ymin,ymax,Ny)
z = np.linspace(zmin,zmax,Nz)
x,y,z = np.meshgrid(x,y,z,indexing='ij')
p = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x))
iso = k3d.marching_cubes(p.astype(np.float32),xmin=xmin,xmax=xmax,ymin=ymin,ymax=ymax, zmin=zmin, zmax=zmax, level=0.0)
plot += iso
plot.display()
this doesnt work:
@interact(rad=widgets.FloatSlider(value=0,min=0,max=1,step=0.01))
def g(rad):
plot.camera = [8,0,8,
0,0,0,
0,1-rad,rad]
while this works:
@interact(rad=widgets.FloatSlider(value=0,min=0,max=1,step=0.01))
def g(rad):
plot.camera = [8,0,8+rad/100,
0,0,0,
0,1-rad,rad]
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
This tiny camera can show the world from a bug's point of view
This tiny camera can show the world from a bug's point of view. Steerable arm helps save energy while capturing panoramic views.
Read more >Camera Bug is a small but smart solution to a big but common ...
The Camera Bug, in contrast, is designed so that your hand and finger are always where they should be, right over the grip...
Read more >Bugs flying around at night are setting it off my security ...
Anything that changes in the image will be picked up as motion. Unfortunately, insects are attracted to infrared light and will fly in...
Read more >How to Keep Spiders, Bugs, and Insects Off Security Cameras
Disable the LED lights. Bugs are attracted to the LED lighting around your camera lens. If your camera allows, turn it off. Loop...
Read more >Flying Bugs on your Night Vision Camera? Here's How to Stop ...
If you've noticed bugs swarming your security camera, there's a very probable chance that the light emitted by your camera is attracting insects...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Nice spot! This is a issue in ThreeJs: https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js#L357
ThreeJs emite change event only if position change. They ignore a up vector. You can add them a issue.
check for
jupyter --paths: - perhaps you have k3d installed in a multiple locations e.g both in system and user space. Also have a look atjupyter nbextension list. It is possible that you will have to delete some location if there are doubled.In principle, if jupyter notebook is running kernel from some different env - then I use --user for nbextensions (like central jupyterhub installations)