当前位置: 首页 > news >正文

广州模板建站软件zencart 网站安装

广州模板建站软件,zencart 网站安装,中国万网登录入口,青岛企业网站制作本文 以 Python 语言开发 我们在做三维软件开发时#xff0c;经常会用到相机坐标轴#xff0c;来指示当前空间位置#xff1b; 坐标轴效果#xff1a; 相机方向坐标轴 Cube 正方体坐标轴 自定义坐标轴#xff1a; Code#xff1a; Axes def main():colors vtkNamedC…本文 以 Python 语言开发 我们在做三维软件开发时经常会用到相机坐标轴来指示当前空间位置 坐标轴效果 相机方向坐标轴 Cube 正方体坐标轴 自定义坐标轴 Code Axes def main():colors vtkNamedColors()# create a SpheresphereSource vtkSphereSource()sphereSource.SetCenter(0.0, 0.0, 0.0)sphereSource.SetRadius(0.5)# create a mappersphereMapper vtkPolyDataMapper()sphereMapper.SetInputConnection(sphereSource.GetOutputPort())# create an actorsphereActor vtkActor()sphereActor.SetMapper(sphereMapper)# a renderer and render windowrenderer vtkRenderer()renderWindow vtkRenderWindow()renderWindow.SetWindowName(Axes)renderWindow.AddRenderer(renderer)# an interactorrenderWindowInteractor vtkRenderWindowInteractor()renderWindowInteractor.SetRenderWindow(renderWindow)# add the actors to the scenerenderer.AddActor(sphereActor)renderer.SetBackground(colors.GetColor3d(SlateGray))transform vtkTransform()transform.Translate(1.0, 0.0, 0.0)axes vtkAxesActor()# The axes are positioned with a user transformaxes.SetUserTransform(transform)# properties of the axes labels can be set as follows# this sets the x axis label to redaxes.GetXAxisCaptionActor2D().GetCaptionTextProperty().SetColor(colors.GetColor3d(Red));# the actual text of the axis label can be changed:axes.SetXAxisLabelText(test)renderer.AddActor(axes)renderer.GetActiveCamera().Azimuth(50)renderer.GetActiveCamera().Elevation(-30)renderer.ResetCamera()renderWindow.SetWindowName(Axes)renderWindow.Render()# begin mouse interactionrenderWindowInteractor.Start()if __name__ __main__:main() CameraOrientationWidget def main():colors vtkNamedColors()renderer vtkRenderer()ren_win vtkRenderWindow()interactor vtkRenderWindowInteractor()sphere_source vtkSphereSource()sphere_source.SetRadius(10.0)mapper vtkPolyDataMapper()mapper.SetInputConnection(sphere_source.GetOutputPort())actor vtkActor()actor.GetProperty().SetColor(colors.GetColor3d(Beige))actor.SetMapper(mapper)renderer.AddActor(actor)renderer.SetBackground(colors.GetColor3d(DimGray))ren_win.AddRenderer(renderer)ren_win.SetSize(600, 600)ren_win.SetWindowName(CameraOrientationWidget)# Important: The interactor must be set prior to enabling the widget.interactor.SetRenderWindow(ren_win)cam_orient_manipulator vtkCameraOrientationWidget()cam_orient_manipulator.SetParentRenderer(renderer)# Enable the widget.cam_orient_manipulator.On()ren_win.Render()interactor.Initialize()interactor.Start()if __name__ __main__:main() OrientationMarkerWidget colors vtkNamedColors()# create a rendering window and rendererren vtkRenderer()ren_win vtkRenderWindow()ren_win.AddRenderer(ren)ren_win.SetWindowName(OrientationMarkerWidget)# create a renderwindowinteractoriren vtkRenderWindowInteractor()iren.SetRenderWindow(ren_win)cube vtkCubeSource()cube.SetXLength(200)cube.SetYLength(200)cube.SetZLength(200)cube.Update()cm vtkPolyDataMapper()cm.SetInputConnection(cube.GetOutputPort())ca vtkActor()ca.SetMapper(cm)ca.GetProperty().SetColor(colors.GetColor3d(BurlyWood))ca.GetProperty().EdgeVisibilityOn()ca.GetProperty().SetEdgeColor(colors.GetColor3d(Red))# assign actor to the rendererren.AddActor(ca)ren.SetBackground(colors.GetColor3d(CornflowerBlue))axes_actor vtkAnnotatedCubeActor()axes_actor.SetXPlusFaceText(L)axes_actor.SetXMinusFaceText(R)axes_actor.SetYMinusFaceText(I)axes_actor.SetYPlusFaceText(S)axes_actor.SetZMinusFaceText(P)axes_actor.SetZPlusFaceText(A)axes_actor.GetTextEdgesProperty().SetColor(colors.GetColor3d(Yellow))axes_actor.GetTextEdgesProperty().SetLineWidth(2)axes_actor.GetCubeProperty().SetColor(colors.GetColor3d(Blue))axes vtkOrientationMarkerWidget()axes.SetOrientationMarker(axes_actor)axes.SetInteractor(iren)axes.EnabledOn()axes.InteractiveOn()ren.ResetCamera()# enable user interface interactoriren.Initialize()ren_win.Render()ren.GetActiveCamera().Azimuth(45)ren.GetActiveCamera().Elevation(30)ren_win.Render()iren.Start() custom OrientationMarker colors vtkNamedColors()reader vtkXMLPolyDataReader()reader.SetFileName(./Human.vtp)icon_mapper vtkDataSetMapper()icon_mapper.SetInputConnection(reader.GetOutputPort())icon_actor vtkActor()icon_actor.SetMapper(icon_mapper)icon_actor.GetProperty().SetColor(colors.GetColor3d(Silver))# Set up the renderer, window, and interactorrenderer vtkRenderer()renderer.SetBackground(colors.GetColor3d(SlateGray))ren_win vtkRenderWindow()ren_win.AddRenderer(renderer)ren_win.SetSize(400, 400)ren_win.SetWindowName(OrientationMarkerWidget1)iren vtkRenderWindowInteractor()iren.SetRenderWindow(ren_win)rgb [0.0, 0.0, 0.0]colors.GetColorRGB(Wheat, rgb)# Set up the widgetwidget vtkOrientationMarkerWidget()widget.SetOrientationMarker(icon_actor)widget.SetInteractor(iren)widget.SetViewport(0.0, 0.0, 0.3, 0.3)widget.SetOutlineColor(*rgb)widget.SetEnabled(1)widget.InteractiveOn()# Create a superquadricsuperquadric_source vtkSuperquadricSource()superquadric_source.SetPhiRoundness(.001)superquadric_source.SetThetaRoundness(.04)# Create a mapper and actorsuperquadric_mapper vtkPolyDataMapper()superquadric_mapper.SetInputConnection(superquadric_source.GetOutputPort())superquadric_actor vtkActor()superquadric_actor.SetMapper(superquadric_mapper)superquadric_actor.GetProperty().SetInterpolationToFlat()superquadric_actor.GetProperty().SetDiffuseColor(colors.GetColor3d(Carrot))superquadric_actor.GetProperty().SetSpecularColor(colors.GetColor3d(White))superquadric_actor.GetProperty().SetDiffuse(0.6)superquadric_actor.GetProperty().SetSpecular(0.5)superquadric_actor.GetProperty().SetSpecularPower(5.0)renderer.AddActor(superquadric_actor)renderer.ResetCamera()ren_win.Render()iren.Initialize()iren.Start()
http://www.pierceye.com/news/365392/

相关文章:

  • 男人做想看的免费网站网页设计有哪些岗位
  • 南江县规划和建设局网站怎样做淘宝客导购网站
  • 浦江县住房和城乡建设局网站校园网站开发方案
  • 微做网站网站开发源代码
  • 福建省住房城乡建设部网站fusionaccess免费服务器
  • 山东省春季高考网站建设试题莱芜在线论坛莱芜话题秦立奉
  • 太原城市建设招标网站电子商务是干什么的具体
  • 网站 营销网站的备案的要多少钱
  • 网站模板 源码wordpress手机端装换
  • 咋把网站制作成软件wordpress添加单页模板
  • 大连网站平台研发偷别人的WordPress主题
  • 做网站ps文字有锯齿公司做外地网站
  • 如何在百度提交自己的网站梦织和wordpress特点
  • 毕业设计做网站还是系统好网站可以随便创建么
  • 做网站与网页有什么区别昊客网络
  • 临沂地区建站网站设计一个企业网站首页
  • wordpress本地建站精准信息预测
  • 云服务器如何安装网站爱站网seo综合查询
  • 个人建什么样的网站好wordpress添加用户登录
  • 中国教育网站官网做网站购买域名之后
  • 公司网站建设的优势新图闻的品牌建设经验
  • 网站建设是在商标哪个类别深圳宝安区新安街道
  • 网站推广服务器怎么选wordpress获取菜单链接地址
  • 横岗做网站外贸网站建设推广优化
  • 怎样搭建一个个人网站国金紫郡府淮北论坛
  • 网站建设类型wordpress词典模板
  • wordpress标签订阅插件优化网站视频
  • 聊城市建设工程质量监督站网站济南建站公司哪有
  • 郑州做网站便宜没有有知道钓鱼网站在哪儿做
  • 免费建自己域名的网站吗seo推广排名软件