文件名称:Applications-draw-beautiful-flowers
- 所属分类:
- GDI/图象编程
- 资源属性:
- [Windows] [Visual C] [Basic/ASP] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- 安*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
数学中有三叶玫瑰线(方程为ρ=Asin(3β)、四叶玫瑰线(方程为ρ=Asin(2β)等曲线,这些曲线的极坐标方程很简单,基本形式均为:ρ=Asin(nβ),即任意一点的极半径ρ是角度β的函数;其直角坐标方程为:x=Asin(nβ)cos(β),y =Asin(nβ)sin(β)。
在程序中控制角度β使其从0变化到2π,描出极半径ρ所对应的点,这样就可以绘出漂亮的玫瑰线;当然,n不同所描出的曲线的形状也就不同。
出于好奇,笔者又编写了一些方程,如:ρ=A[sin(nβ)+3 sin(3nβ)]、ρ=Asin(nβ)exp(-kβ)等等,结果发现每种方程都能绘出形状各异的漂亮曲线。今介绍其中的六种,暂命名为:玫瑰线、玫瑰环、万寿菊、大丽花、蓬蒿菊、令箭荷花。-1. Algorithm Overview
If using an event loop to control the angle β from 0 to 2π, then draw the flower is static. If the timer event so that β increases every time a certain value, and draw the corresponding line segment, then draw the flower is dynamic. If you add a timer event in the time factor, that equation becomes: x = Asin (nβ) cos (β+ t), y = Asin (nβ) sin (β+ t) changing the value of t, and Each t draw β from 0 to 2π corresponding to the graphics, then draw the flowers will spin. If the line drawn between the endpoints, then draw the flower is hollow if drawn from the center line to the end, the draw of the flower is solid.
2. Interface design
Start VB6.0, add the following controls: used to select the pattern of the combo box Combo1 (the nickname as a list in front of the six items), the effect of the combo box for selecting Combo2 (list of contents as follows: static, dynamic and rotary) , n used to change the scroll bar HScroll1, n used to display the label Label1,
在程序中控制角度β使其从0变化到2π,描出极半径ρ所对应的点,这样就可以绘出漂亮的玫瑰线;当然,n不同所描出的曲线的形状也就不同。
出于好奇,笔者又编写了一些方程,如:ρ=A[sin(nβ)+3 sin(3nβ)]、ρ=Asin(nβ)exp(-kβ)等等,结果发现每种方程都能绘出形状各异的漂亮曲线。今介绍其中的六种,暂命名为:玫瑰线、玫瑰环、万寿菊、大丽花、蓬蒿菊、令箭荷花。-1. Algorithm Overview
If using an event loop to control the angle β from 0 to 2π, then draw the flower is static. If the timer event so that β increases every time a certain value, and draw the corresponding line segment, then draw the flower is dynamic. If you add a timer event in the time factor, that equation becomes: x = Asin (nβ) cos (β+ t), y = Asin (nβ) sin (β+ t) changing the value of t, and Each t draw β from 0 to 2π corresponding to the graphics, then draw the flowers will spin. If the line drawn between the endpoints, then draw the flower is hollow if drawn from the center line to the end, the draw of the flower is solid.
2. Interface design
Start VB6.0, add the following controls: used to select the pattern of the combo box Combo1 (the nickname as a list in front of the six items), the effect of the combo box for selecting Combo2 (list of contents as follows: static, dynamic and rotary) , n used to change the scroll bar HScroll1, n used to display the label Label1,
(系统自动生成,下载前可以参看下载内容)
下载文件列表
用程序绘制美丽的花\MSSCCPRJ.SCC
..................\~$绘制美丽的花.doc
..................\玫瑰线.frm
..................\玫瑰线.frx
..................\玫瑰线.vbp
..................\玫瑰线.vbw
用程序绘制美丽的花
..................\~$绘制美丽的花.doc
..................\玫瑰线.frm
..................\玫瑰线.frx
..................\玫瑰线.vbp
..................\玫瑰线.vbw
用程序绘制美丽的花