使用OpenGL扭曲(螺旋)两根电线 [英] Twisting (spiral) of two wires using OpenGL

查看:109
本文介绍了使用OpenGL扭曲(螺旋)两根电线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想在VC ++环境中使用OpenGL显示两根线的扭曲.我对OpenGL知之甚少.
请提供您的建议和见识以实现它.

Hi All,

I want to display twisting of two wires using OpenGL in VC++ environment. I have little knowledge to OpenGL.
Please provide your suggestion and insight to achieve it.

推荐答案

我将从学习OpenGL开始.

有关如何执行许多常见OpenGL任务的示例,请参见 OpenGL代码资源.

请注意,有一个免责声明,样本中包含3.1中不支持的代码.暂时不用担心.

我将从使3D线像线一样缠绕在一起开始,以开始您的核心几何图形.不要让它们接触,但要使它们与所需电线的直径分开.

然后使用这些线定义连接网格圆柱体的线段.

听起来很有趣!
祝你好运!
I would start by learning OpenGL.

See the OpenGL Code Resources for examples on how to do many common OpenGL tasks.

Note that there is a disclaimer that the samples have code that isn''t supported in 3.1. Don''t worry about that for now.

I would start with getting 3D lines to intertwine like they are wires, to get your core geometry started. Don''t have them touching, but have them separated by the diameter of your desired wires.

Then use those lines to define the segments of connecting mesh cylinders.

Sounds like fun!
Good luck!


这篇关于使用OpenGL扭曲(螺旋)两根电线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆