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

静态网站模板制作触屏版网站开发

静态网站模板,制作触屏版网站开发,163免费企业邮箱,杭州网站推广营销服务目录 1. 预测的3D轨迹和实际轨迹的动画图#xff0c;同时动态更新 2 真值轨迹设置为静态的#xff0c;预测轨迹不断更新 3 网格的三维坐标系有旋转运动#xff0c;以此全方位展示预测轨迹和真值轨迹之间的空间关系 1. 预测的3D轨迹和实际轨迹的动画图#xff0c;同时动态更…目录 1. 预测的3D轨迹和实际轨迹的动画图同时动态更新 2 真值轨迹设置为静态的预测轨迹不断更新 3 网格的三维坐标系有旋转运动以此全方位展示预测轨迹和真值轨迹之间的空间关系 1. 预测的3D轨迹和实际轨迹的动画图同时动态更新 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation, PillowWriter# 假设您有两组连续平滑的姿势数据集一组表示预测值一组表示真值 # 每个数据点包含姿势信息 [x, y, z, roll, pitch, yaw] # 这里使用一些示例数据您需要替换为您的实际数据 num_poses 200 # 增加轨迹点数 t np.linspace(0, 20, num_poses) # 时间点使轨迹变得更长 # 生成示例数据来表示预测值轨迹 x_pred np.sin(t) y_pred np.cos(t) z_pred np.linspace(0, 10, num_poses) # 生成示例数据来表示真值轨迹 x_true np.sin(t) 0.5 # 真值轨迹稍微偏移 y_true np.cos(t) 0.5 z_true np.linspace(0, 10, num_poses)# 创建一个 3D 图形 fig plt.figure() ax fig.add_subplot(111, projection3d)# 创建空的轨迹线一个红色表示预测值一个蓝色表示真值 line_pred, ax.plot([], [], [], markero, linestyle-, markersize4, colorred, labelPredicted Trajectory) line_true, ax.plot([], [], [], markero, linestyle-, markersize4, colorgreen, labelTrue Trajectory)# 设置图形标题和轴标签 ax.set_title(Pose Trajectories (Predicted vs. True)) ax.set_xlabel(X) ax.set_ylabel(Y) ax.set_zlabel(Z)# 添加图例 ax.legend(locupper right)# 初始化函数用于绘制空轨迹线 def init():line_pred.set_data([], [])line_pred.set_3d_properties([])line_true.set_data([], [])line_true.set_3d_properties([])return line_pred, line_true# 更新函数用于更新轨迹线的数据 def update(frame):line_pred.set_data(x_pred[:frame], y_pred[:frame])line_pred.set_3d_properties(z_pred[:frame])line_true.set_data(x_true[:frame], y_true[:frame])line_true.set_3d_properties(z_true[:frame])# 扩大坐标范围以包围轨迹ax.set_xlim(min(x_true) - 1, max(x_true) 1)ax.set_ylim(min(y_true) - 1, max(y_true) 1)ax.set_zlim(min(z_true) - 1, max(z_true) 1)return line_pred, line_true# 创建动画对象 ani FuncAnimation(fig, update, framesnum_poses, init_funcinit, blitTrue)# 创建一个文件名为animation.gif的视频文件使用PillowWriter ani.save(animation_gt.gif, writerPillowWriter(fps30))# 显示动画 plt.show()2 真值轨迹设置为静态的预测轨迹不断更新 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation, PillowWriter# 假设您有两组连续平滑的姿势数据集一组表示预测值一组表示真值 # 每个数据点包含姿势信息 [x, y, z, roll, pitch, yaw] # 这里使用一些示例数据您需要替换为您的实际数据 num_poses 200 # 增加轨迹点数 t np.linspace(0, 20, num_poses) # 时间点使轨迹变得更长 # 生成示例数据来表示预测值轨迹 x_pred np.sin(t) y_pred np.cos(t) z_pred np.linspace(0, 10, num_poses) # 生成示例数据来表示真值轨迹 x_true np.sin(t) np.random.uniform(-0.2, 0.3) # 真值轨迹稍微偏移 y_true np.sin(t) np.random.uniform(-0.2, 0.3) # 真值轨迹稍微偏移 z_true np.linspace(0, 10, num_poses)# 创建一个 3D 图形 fig plt.figure() ax fig.add_subplot(111, projection3d)# 创建空的轨迹线一个红色表示预测值一个绿色表示真值 line_pred, ax.plot([], [], [], markero, linestyle-, markersize4, colorred, labelPredicted Trajectory) line_true, ax.plot(x_true, y_true, z_true, markero, linestyle-, markersize4, colorgreen, labelTrue Trajectory)# 设置图形标题和轴标签 ax.set_title(Pose Trajectories (Predicted vs. True)) ax.set_xlabel(X) ax.set_ylabel(Y) ax.set_zlabel(Z)# 添加图例 ax.legend(locupper right)# 设置轨迹显示范围 ax.set_xlim(-2, 2) # X轴范围 ax.set_ylim(-2, 2) # Y轴范围 ax.set_zlim(0, 12) # Z轴范围# 初始化函数用于绘制空轨迹线 def init():line_pred.set_data([], [])line_pred.set_3d_properties([])return line_pred, line_true# 更新函数用于更新预测轨迹的数据 def update(frame):line_pred.set_data(x_pred[:frame], y_pred[:frame])line_pred.set_3d_properties(z_pred[:frame])return line_pred, line_true# 创建动画对象 ani FuncAnimation(fig, update, framesnum_poses, init_funcinit, blitTrue)# 创建一个文件名为animation.gif的视频文件使用PillowWriter ani.save(animation_1.gif, writerPillowWriter(fps30))# 显示动画 plt.show()3 网格的三维坐标系有旋转运动以此全方位展示预测轨迹和真值轨迹之间的空间关系 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation, PillowWriter# 假设您有两组连续平滑的姿势数据集一组表示预测值一组表示真值 # 每个数据点包含姿势信息 [x, y, z, roll, pitch, yaw] # 这里使用一些示例数据您需要替换为您的实际数据 num_poses 200 # 增加轨迹点数 t np.linspace(0, 20, num_poses) # 时间点使轨迹变得更长 # 生成示例数据来表示预测值轨迹 x_pred np.sin(t) y_pred np.cos(t) z_pred np.linspace(0, 10, num_poses) # 生成示例数据来表示真值轨迹 x_true np.sin(t) 0.5 # 真值轨迹稍微偏移 y_true np.cos(t) 0.5 z_true np.linspace(0, 10, num_poses)# 创建一个 3D 图形 fig plt.figure() ax fig.add_subplot(111, projection3d)# 创建空的轨迹线一个红色表示预测值一个蓝色表示真值 line_pred, ax.plot([], [], [], markero, linestyle-, markersize4, colorred, labelPredicted Trajectory) line_true, ax.plot(x_true, y_true, z_true, markero, linestyle-, markersize4, colorblue, labelTrue Trajectory)# 设置图形标题和轴标签 ax.set_title(Pose Trajectories (Predicted vs. True)) ax.set_xlabel(X) ax.set_ylabel(Y) ax.set_zlabel(Z)# 添加图例 ax.legend(locupper right)# 设置轨迹显示范围 ax.set_xlim(-2, 2) # X轴范围 ax.set_ylim(-2, 2) # Y轴范围 ax.set_zlim(0, 12) # Z轴范围# 初始化函数用于绘制空轨迹线 def init():line_pred.set_data([], [])line_pred.set_3d_properties([])return line_pred, line_true# 更新函数用于更新预测轨迹的数据和整体的旋转运动 def update(frame):line_pred.set_data(x_pred[:frame], y_pred[:frame])line_pred.set_3d_properties(z_pred[:frame])# 添加整体的旋转运动ax.view_init(elev20, azimframe) # 调整视角azim控制旋转return line_pred, line_true# 创建动画对象 ani FuncAnimation(fig, update, framesnum_poses, init_funcinit, blitTrue)# 创建一个文件名为animation.gif的视频文件使用PillowWriter ani.save(animation.gif, writerPillowWriter(fps30))# 显示动画 plt.show()更新函数中使用了ax.view_init来控制整体的旋转运动elev参数用于调整仰角azim参数用于控制旋转。您可以根据需要调整elev和azim的值来实现所需的旋转效果。
http://www.tj-hxxt.cn/news/135151.html

相关文章:

  • 做暧视频网站wordpress 漫画 主题
  • 档案网站的建设方案学it需要什么学历
  • 搜索电商怎么做搜索引擎营销优化诊断训练
  • 徐州建站模板公司微企点做的网站百度搜得到吗
  • 网站备案需要营业执照吗摄影网站怎么做数据库
  • 五屏网站建设平台楚雄 公司 网站
  • 企业网站建设的三个核心问题制作自己的网站多少钱
  • 网站建设合同甲乙双方怎么确定深圳福田在线
  • 在线玩网页游戏h5网站大全wordpress 帖子付费
  • 网站已备案 还不能访问我的网站突然打不开了
  • 环保网站案例佛山网络建设推广
  • 阿里云免费网站爱山东app二维码
  • 网站建设需要准备那些内容网页排版设计欣赏
  • 理财网站如何做推广怎么做自己的品牌网站
  • 成品动漫和视频网站入口js做网站需要那些软件
  • 服务器做的网站怎么使用教程定制设计的网站
  • 运营推广计划怎么写seo优化工作内容做什么
  • 网站页面设计方案工作设计室网站
  • 网页设计与网站建设实训报告网站提供商
  • 网站搭建书籍推荐游戏页面
  • 正版网站设计制作2023网站推广入口
  • 长沙网站建设qq交流群wordpress 访问页面空白
  • 做网站的赢利点联图二维码生成器
  • 设计网站的关键点三维家装设计软件
  • 网站被镜像怎么做wordpress footer.php添加qq悬浮
  • 网站如何做seo推广方案浙江省建设局教育网站
  • 企业网站优化17专做衬衫的网站
  • 如何做繁体字网站珠海网站设计多少钱
  • 大淘客网站建设网站制作建设有哪些
  • 网站地图怎样做专业生产车间设计图纸网站