登录
首页 » 算法 » 适用于 Pygame 的 Python 线交叉

适用于 Pygame 的 Python 线交叉

于 2022-03-15 发布 文件大小:1.45 kB
0 147
下载积分: 2 下载次数: 1

代码说明:

翻译 maninwest@Codeforge 作者:raildude@CodeProject计算 2 D 线段交点(如存在)的算法这是种应用代数的练习题, (尤其是方程  y = mx + b, 所谓的线性方程的斜截式).背景我有个  Python 的 3d 查看应用程序,使用 Pygame 做 UI。 它有线框显示和原始的"隐藏表面移除"选项。我想添加一个隐藏线移除的选项,因为Pygame 好像不支持 "空心多边形" 绘制方法. 我想此代码可能是向该方向迈出的一步。稍后,我发现 MeshLab 可以提供我想要的功能..使用代码你需要安装  Python和  Pygame。或者,你可以提取四个函数 (slope(), y_intercept(), intersect() & segment_intersect()) 并在合适的地方使用。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 小生境遗传(NGA)的MATLAB工具箱及四个应用实例
    小生境遗传算法(NGA)的MATLAB工具箱及四个应用实例,这个代码可以和支持向量机融合,根据自己的需要,来编写程序,这是最新的研究算法 提供给对支持向量机感兴趣的人
    2022-08-15 03:08:51下载
    积分:1
  • c/c++编写的一个日历程序
    是c/c++编写的一个算法程序,在VC6.0里执行该程序之后,会显示年月日,并且该年月日是当天的时间,对于c/c++的编写有一定的参考性,可以以此为基础进行其他程序的移植。
    2022-09-14 16:15:03下载
    积分:1
  • 它把一副图片分成RGB三个通道进行显示,使用时请注意你自己的文件路径
    这个是基于VC6.0+opencv1.0平台下运行的,大家打开这个文件的时候可能会感觉到程序好像有点乱,你直接复制然后粘贴到你的程序界面就可以使用了,它把一副图片分成RGB三个通道进行显示,使用时请注意你自己的文件路径
    2022-10-11 15:40:04下载
    积分:1
  • 2400 bps MELP语音编解码器浮点.zip
    2400 bps MELP语音编解码器浮点算法.zip   
    2023-05-25 09:40:02下载
    积分:1
  • vibe
    vibe算法opencv实现源码,稍作修改,可以实现运动目标检测功能,个人认为背景建模和更新部分还存在缺陷
    2022-04-13 01:28:31下载
    积分:1
  • 城市轮廓线。采用分治发,输入为第一行房子个数,而后(左,高,右)。...
    城市轮廓线算法。采用分治发算法,输入为第一行房子个数,而后(左,高,右)。-Contour algorithm city. Made use of sub-rule algorithm, enter the number for the first line of the house, and then (left, high, right).
    2023-02-17 21:45:03下载
    积分:1
  • 飞控资料合集
    资源描述四旋翼无人飞行器的PID算法程序,飞控板电路以及部分详细说明,别的不多说,自己看吧。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
    2023-05-20 01:50:05下载
    积分:1
  • 指数平滑
    指数平滑法在电力系统负荷预测中有着重要的应用,是电力系统负荷预测的一种重要算法,该源代码又分别实现了一次指数平滑法、二次指数平滑法两种算法。
    2022-08-18 15:22:01下载
    积分:1
  • 数值方上机实验内容. 自适应用图象实现效果.
    数值方法上机实验内容. 自适应算法用图象实现效果.-numerical methods for experiments. Adaptive algorithms used images to achieve results.
    2022-05-16 08:49:17下载
    积分:1
  • C#计
    using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Runtime.InteropServices; using System.IO; namespace 计算器 { /// /// Form1 的摘要说明。 /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button5; private System.Windows.Forms.Button button6; private System.Windows.Forms.Button button7; private System.Windows.Forms.Button button8; private System.Windows.Forms.Button button9; private System.Windows.Forms.Button button11; private System.Windows.For
    2023-01-30 17:15:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载