我試圖用陰謀繪製3D圖形並需要調整攝像機位置。我發現有兩種方法可以做到這一點:或者用camera
屬性的Scene
對象,或者用cameraposition
屬性。我對兩者都有問題,但是這個問題與cameraposition
有關:我無法弄清楚它是什麼意思。如何在攝像機拍攝中工作
的docs說:
| cameraposition [required=False] (value=camera position list or 1d numpy
| array):
| Sets the camera position with respect to the scene. The first entry
| (a list or 1d numpy array of length 4) sets the angular position of
| the camera. The second entry (a list or 1d numpy array of length 3)
| sets the (x,y,z) translation of the camera. The third entry (a
| scalar) sets zoom of the camera.
|
| Examples:
| [[0.2, 0.5, 0.1, 0.2], [0.1, 0, -0.1], 3]
什麼的4個數字相機的角位置是什麼意思?他們是角度嗎?以弧度?哪些角度?
哦,很好!這不完全是我的問題的答案,但它解決了我的問題無論如何:)其實,我有點困惑之間的相機和相機位置和思考問第二個問題關於「相機」(如何放大與「相機」 ),這就是那個沒有提出問題的答案。 :) 不管怎樣,謝謝。 –
我建議對答案進行編輯,添加鏈接頁面的摘要,因爲SO上的鏈接專用答案是不鼓勵的。 –
謝謝!遺憾的是,我也在這裏複製:http://stackoverflow.com/questions/35478791/grab-camera-position-from-plotly-3d-graph/35497559#35497559 明天這將被添加到官方的Plotly Python文檔中。 – user1561393