提供上面算法者,给100分。
现在本人有个项目需要制图,图也不是很复杂,只要是本人没有制图的经验。
如果有兴趣者请加QQ270525541。
如果能帮本人做出这个制图的小程序,本人将给500-1000RMB报酬。

解决方案 »

  1.   

    设起点坐标为(x0,y0);L2与水平轴的夹角为α;L1,L2夹角为θ,则:
    L2的终点坐标为:
    X=L2(COSθCOSα-SINθSINα)+X0
    Y=L2(sinθcosα+cosθsinα)+Y0
    如果L1与水平轴平行,则:
    X=L2COSθ)+X0
    Y=L2sinθ+Y0
      

  2.   

    <html xmlns:v="urn:schemas-microsoft-com:vml">
    <head>
    <STYLE>
    v\:* { Behavior: url(#default#VML) }
    </STYLE>
    </head>
       <body>
       <v:line id=vl_1 from="0,0" to="0,0" style="position:absolute;"/>
       <v:line id=vl_2 from="0,0" to="0,0" style="position:absolute;" />
      <script language="javascript">
    drawAngle(100,100,180,80,70)
    function drawAngle(startCordX,startCordY,line1Length,line2Length,angle){
    var obj1=document.getElementById("vl_1")
    var obj2=document.getElementById("vl_2")
    obj1.from=startCordX+","+startCordY
    obj1.to=(startCordX+line1Length)+","+startCordY
    obj2.from=(startCordX+line1Length)+","+startCordY
    var pi=Math.PI
    var obj2X=(startCordX+line1Length)-line2Length*Math.cos(angle*(pi/180))
    var obj2Y=startCordY-line2Length*Math.sin(angle*(pi/180))
           obj2.to=obj2X+","+obj2Y
       }
     </script>
    </body>
    </html>
      

  3.   


    // params:
    //startCordX   第一条线的起点横坐标
    //startCordY   第一条线的起点纵坐标
    //line1Length  第一条线的长度
    //line2Length  第二条线的长度
    //angle        第一条线与第二条线的夹角
      

  4.   

    使用vml画图啊。最方便了。到网上找个例子。自己看看吧。不是很麻烦的!