.
Grasshopper 0.8.0001 is now available for download.
http://www.grasshopper3d.com/page/next-build
.
Grasshopper 0.8.0001
11/17/2010 | 0 意見
標籤: grasshopper
UsingEnum
使用軟體: Visual c# 2008 Express
----------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class UsingEnum
    {
        enum WeekDay
        {
            sun = 1,
            mon = 2,
            tue = 3,
            wed = 4,
            thi = 5,
            fri = 6,
            sat = 7
        }
        static void Main()
        {
            Console.WriteLine("星期日為一周的第{0}天!!", (int)WeekDay.sun);
            Console.WriteLine("星期一為一周的第{0}天!!", (int)WeekDay.mon);
            Console.WriteLine("星期二為一周的第{0}天!!", (int)WeekDay.tue);
            Console.WriteLine("星期三為一周的第{0}天!!", (int)WeekDay.wed);
            Console.WriteLine("星期四為一周的第{0}天!!", (int)WeekDay.thi);
            Console.WriteLine("星期五為一周的第{0}天!!", (int)WeekDay.fri);
            Console.WriteLine("星期六為一周的第{0}天!!", (int)WeekDay.sat);
            Console.ReadLine();
        }
    }
}
conversion
使用軟體: Visual c# 2008 Express
-----------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class conversion
    {
        static void Main(string[] args)
        {
            int a = 10;
            double b = 0;
            b = a;
            b = 20.5;
            a = (int)b;
            Console.WriteLine("a = " + a);
            Console.WriteLine("b = " + b);
            float c = 20;
            c = 20.5f;
            c = (float)20.5;
            Console.WriteLine("c = " + c);
            char d = (char)65;
            Console.WriteLine("d = " + d);
            Console.ReadLine();
           
                      
        }
    }
}
UsingFloatPoint2
使用軟體: Visual c# 2008 Express
-------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class UsingFloatPoint2
    {
        static void Main(string[] args)
        {
            char theChar1 = 'a';
            char theChar2 = '文';
            char theChar3 = '\x0059';
            char theChar4 = '\u0058';
            char theChar5 = '\a'; //鬧鐘(警示)\u0007
            char theChar6 = '\b'; //退格鍵\u0008
            char theChar7 = '\t'; //水平tab定位鍵\u0009
            char theChar8 = '\r'; //換行字元\u000D
            char theChar9 = '\v'; //垂直tab定位鍵\u000B
            char theChar10 = '\f'; //換頁\u000C
            char theChar11 = '\n'; //換行\u000A
            char theChar12 = '\'';
            //
            Console.WriteLine(theChar1);
            Console.WriteLine(theChar2);
            Console.WriteLine(theChar3);
            Console.WriteLine(theChar4);
            Console.WriteLine(theChar5);
            Console.WriteLine(theChar6);
            Console.WriteLine(theChar7);
            Console.WriteLine(theChar8);
            Console.WriteLine(theChar9);
            Console.WriteLine(theChar10);
            Console.WriteLine(theChar11);
            Console.WriteLine(theChar12);
            //
            Console.ReadLine();
                      
        }
    }
}
UsingFloatPoint
使用軟體: Visual c# 2008 Express
--------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class UsingFloatPoint
    {
        static void Main(string[] args)
        {
            double x = 123.45;
            float y = 123.45f;
            Console.WriteLine("x:" + x);
            Console.WriteLine("y:" + y);
            Console.ReadLine();
        }
    }
}
Usingintegral
使用軟體: Visual c# 2008 Express
---------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Usingintegral
    {
        static void Main(string[] args)
        {
            int x = 256;
            byte y = 255;
            Console.WriteLine("x:" + x);
            Console.WriteLine("y:" + y);
            Console.ReadLine();
        }
    }
}
UsingConstant
使用軟體: Visual c# 2008 Express
常數宣告與使用
-------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class UsingConstant
    {
        static void Main()
        {
            int intMyInt = 123 ;
            const int myConst = 456 ;
            Console.WriteLine("變數 intMyInt =  {0}" ,intMyInt);
            Console.WriteLine("常數 myConst =  {0}" ,myConst);
            intMyInt = 321;
            Console.WriteLine("變數 intMyInt =  {0}" ,intMyInt);
            Console.ReadLine();
        }
    }
}
UsingVariable
使用軟體: Visual c# 2008 Express
宣告 字串/整數/浮點數 變數,初始化並且輸出於主控台
------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class UsingVariable
    {
        static void Main()
        {
            char strMyString = 'a' ;
            int intMyInt = 123 ;
            float fMyFloat ;
            Console.WriteLine(strMyString) ;
            Console.WriteLine(intMyInt) ;
            fMyFloat = 123.456f ;
            Console.WriteLine(fMyFloat) ;
            Console.ReadLine();
        }
    }
}
Sayhello
使用軟體: Visual c# 2008 Express
輸入姓名和日期的程式
----------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("請依序輸入你的姓名和生日....");
            Console.WriteLine(" "); 
            Console.Write("姓名:"); 
            string readString = Console.ReadLine();
            Console.WriteLine(" "); 
            Console.Write("生日:");
            string readString2 = Console.ReadLine(); 
            Console.WriteLine(" "); 
            Console.Write("Hello," + readString + "你好,你的生日是" + readString2 );
            Console.ReadLine();
        }
    }
}
-----------------------------------------------------
.
蘋果
使用工具: Rhino+GH
這是CAX玩家論壇上的練習...
第一圖 是題目, 要用數學的方式作出蘋果的曲面
第二圖 解數學函式的GH的方程式
第三圖 尺寸和成品疊合圖
第四圖 成品圖
 



.
7/16/2010 | 0 意見
標籤: CAD, Fun, grasshopper, Industrial Design, Learned, Rhino




















































 
 發表文章
發表文章
 
 

