2006年12月13日 星期三

程式最佳化

 最近幾天開始玩一些幫助程式最佳化的工具,以前都沒有認真地去使用工具分析程式,不知道世界上原來還有這麼好玩的東西。

 

3D程式的最佳化,分別要從CPU及GPU著手,對我而言也就是去分析我的C++ 程式碼以及HLSL。 ( C# 或是 GLSL 我不會用 ) 

 

CPU的分析工具是  Intel    => VTune(tm) Performance Analyzer

                                    AMD =>  CodeAnalyst

 

GPU則使用              ATI         =>  GPU PerfStudio (V1.0 Beta)  及 GPU Shader Analyzer (V1.0) 

                                   NVIDIA =>  NVPerfHUD

 

 

因為我的coding 工具是 Intel + NVidia 的組合,就找了對應的兩樣工具來用。

內行的看門道,外行的湊熱鬧

因為我是外行的,所以就針對工具介面隨便說說感想。

 

VTune用起來果然不錯,支援Visual Studio 的plug-in,在我的VC裡面可以側錄我的程式,計算出functions classes modules 花掉的時間。

知道每個function 被call 的次數,及每次function佔用的時間,很容易就可以找到 hot spot 了。當然啦,Performance Analizer 不找 Hot Spot 要幹麻,

介面長得帥,像我這樣的外行會用,才是重點。

 

至於 NVPerfHUD,長得更帥,更容易上手!!

每個Mesh ( Call DrawPrimitive() ) 可以 Step By Step 畫出來!!

每個 VS 跟 PS 的佔用時間都算好還不稀奇,連每張 Sampler 都有 Preview!!

真是太神啦

連Render To Texture 都可以 Step By Step 畫給你看,真是七武器之首!!

 

看熱鬧到此為止,拿這些東西去挖自己的程式是最恐怖的事,大概會像挖亂葬崗一樣吧 ,真不想面對。

或許跟同事朋友交換程式來挖會比較簡單一點,揭別人瘡疤才不會痛。

2006年11月29日 星期三

關於 AEGIA

        早上一開電腦就去 gamedev.net 爬文章,看到 AEGIA 的 PhysX ( Novodex ) 停收 license fee 的消息。http://www.gamedev.net/community/forums/topic.asp?topic_id=425499

 

          去年我 download 過 Novodex 2.2 版,早上想去 download 號稱 download for free 的 2.5版來玩一玩,沒想到去年申請的帳號已經不能用了。好吧,我想說資料重填再申請一次,要 user 填的資料快跟履歷表一樣多了,download 後的用途就希望 user 填寫幾千字。經過3分鐘的亂填,寫兩句為了自我學習而download就apply,想不到帳號核準已經改成了人工作業,要慢慢等。

 

          有點詫異去年這麼容易就把 Novodex SDK download 下來,過了一年 AEGIA 出了物理加速卡就把 Novodex 當成寶了。關於停收license比較有趣的東西是網友在 gamedev.net 的 comment,貼出了三篇關於物理加速卡的文章。

 


 

         這張卡好像有插沒沒插都一樣,感覺上PPU就是前途灰暗,所以只好讓軟體免費,增加 novodex engine 的市佔率。(偏偏帳號申請這麼麻煩)

 

         最後一點令人注意的是... 這張卡在台灣賣超過9000NTD,美國只要 199USD,台灣硬體商坑人的又一代表作。

2006年10月29日 星期日

軍妓歌

本人同梯 "果糖" 看了軍妓新聞之後大大有感

特填詞 "軍妓歌" 一首,以茲記念。

 

發音宜雄壯有力,但更有激情,有洶湧澎湃之勢,第14句突然輕下來,表現出深層次的悲傷和隱痛,要唱得有內在。

 

軍妓歌      

                  詞: "果糖"  曲: 不詳     C大調    發音  雄壯

 

國家有公娼   軍隊有軍妓
男妓是軍隊的命脈  以高屏地區為第一

搧色腥  堅如鐵  上下詐欺成一體
漢光演習  國家機密  賣給共匪最有利
拖垮同袍  有恃無恐  詐騙伎倆大無比

國民革命軍  愛錢如愛命
軍機淪陷  榮譽掃地
關鍵在軍妓

做軍妓  鼓士氣  倒國家  賣同梯
還債的把握一定在我們手裡

 


2006年10月26日 星期四

2006年10月15日 星期日

搞定 Directx Vertex Declaration

一如往常,我只記錄下網路上難找的問題。

我遇到的問題跟這一篇forum 一樣,去 lock unknown format 的 mesh
http://www.gamedev.net/community/forums/topic.asp?topic_id=370436&forum_id=10&gforum_id=0


解答已經在最下面露出頭了~

就是 crackdecl.h crackdecl.cpp

使用CD3DXCrackDecl1 object即可輕鬆解決 parse D3DVERTEXELEMENT9* 的問題。


crackdecl.h crackdecl.cpp這兩個檔案可以在 DirectX sdk 的Mesh Viewer (DirectX Viewer)中找到。

Euler angles 及 Quaternion

Euler angles 跟 Quaternion 應該是不少人的痛吧,

尤其是兩者之間要互轉時,麻煩可不是普通大而已。

http://www1.acm.org/pubs/tog/GraphicsGems/gemsiv/euler_angle/
使用這隻程式,就可以找出 Euler angles 與 Quaternion 的 1 <-> 1 唯一解了。

 

推薦一個 stl wstring unicode 的 solution

使用stl unicode 字串時常常會遇到 stream 無法輸出 wstring 的問題

在這邊推薦一篇好文章裡面有問題的解決方法

 


codeproject 網站上的好文章很多常常能挖到寶

 

演唱會訊息

最近真是糟透了!~

感覺很多事情都不順利,

想說來補一補年久失修的blog吧,改變一下生活的步調。

 

先貼一貼演唱會資訊...

先是 10月21日 Angra


再來是 11月11日的 Yngwie Malmsteen


這兩場我就不會去了。

2006年8月15日 星期二

BGL 範例更正! 修正BFS DFS 及增加 Edge Property

// BGL_experiment.cpp : Defines the entry point for the console application.
//
// for DFS
#include "depth_first_search.hpp"  // Modify by myself
//#include "stdafx.h"
#include <boost/config.hpp>
#include <iostream>
#include <vector>
#include <utility>
#include <string>

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp> // for boost::make_list
#include <boost/property_map.hpp>
#include <boost/graph/graph_traits.hpp>

// for BFS
#include <boost/graph/breadth_first_search.hpp>
#include <boost/pending/indirect_cmp.hpp>
#include <boost/pending/integer_range.hpp>

 

/*
目標 tree (edge direction 全向下)

        0 Sidius
         /   \
    1 Vader   2 KusoKing
         \   /    \
      3 Obi Lee    4 Prince Bala
         /
    5 SkyJoger

1. 建構 tree
2. 進行 BFS DFS
3. 拆tree
*/

// 記得 using namespace !
using namespace boost;
using namespace std;

struct VertexProperties
{
 // add_edge() 會使用此建構子
 VertexProperties() { }
 VertexProperties(int i, const std::string& n) : index(i) ,name(n) { }
 std::size_t index;
 std::string name;

 boost::default_color_type color;
 boost::vertex_color_t color_t; // usage unknown :P
};

struct EdgeProperties
{
 EdgeProperties() {}
 EdgeProperties(int i, const std::string& n) : index(i) ,name(n) { }
 std::size_t index;
 std::string name;
 boost::default_color_type color; // usage unknown :P
};


template < typename FirstContainer >
    class first_dfs_visitor : public default_dfs_visitor
{

public:

 // member data 
 FirstContainer m_map;
 typename property_traits < FirstContainer >::value_type & m_time;
 typedef typename property_traits < FirstContainer >::value_type T;

 unsigned int* pMatrix;
 // constructor
 first_dfs_visitor(FirstContainer tmap, T & t, unsigned int* pMat):m_map(tmap), m_time(t)
 {
  pMatrix = pMat;
 }


 // override the visitor function
 // more function to find in depth_first_search.hpp

 template < typename Vertex, typename Graph >
 void initialize_vertex(Vertex u, const Graph& g)
 {
  
 }
 template < typename Vertex, typename Graph > 
 void start_vertex(Vertex u, const Graph& g)
 {
  
 }
 
 template < typename Vertex, typename Graph >
 void discover_vertex(Vertex u, const Graph & g) const
 {
  put(m_map, u, m_time++);
  pMatrix[(unsigned int)m_time -1] = (unsigned int) u;
 }
 
 template < typename Vertex, typename Graph >
 void finish_vertex(Vertex u, const Graph& g)
 {
  
 }
 
};


template < typename FirstContainer >
class first_bfs_visitor : public default_bfs_visitor
{


public:
 // member data 
 FirstContainer m_map;
 typename property_traits < FirstContainer >::value_type & m_time;
 typedef typename property_traits < FirstContainer >::value_type T;

 unsigned int* pMatrix;

 // constructor
 first_bfs_visitor(FirstContainer tmap, T & t, unsigned int* pMat):m_map(tmap), m_time(t)
 {
  pMatrix = pMat;
 }

 // override the visitor function
 // more function to find in breadth_first_search.hpp
 template < typename Vertex, typename Graph > 
  void start_vertex(Vertex u, const Graph& g)
 {

 }
 template < typename Vertex, typename Graph >
  void discover_vertex(Vertex u, const Graph & g) const
 {
  //put(m_map, u, m_time++);

 }
 template < typename Vertex, typename Graph >
  void examine_vertex(Vertex u, const Graph & g)
 {
  put(m_map, u, m_time++);
  pMatrix[(unsigned int)m_time -1] = (unsigned int) u;
 }

};

int main(int, char*[])
{

 typedef adjacency_list<vecS,
         vecS,
         directedS,
         VertexProperties,
         EdgeProperties
         > MyGraphType;
 MyGraphType GraphExp;

 property_map<MyGraphType, std::size_t VertexProperties::*>::type
  getid = get(&VertexProperties::index, GraphExp);
 property_map<MyGraphType, std::string VertexProperties::*>::type
  getname = get(&VertexProperties::name, GraphExp);

 property_map<MyGraphType, std::size_t EdgeProperties::*>::type
  getEid = get(&EdgeProperties::index, GraphExp);
 property_map<MyGraphType, std::string EdgeProperties::*>::type
  getEname = get(&EdgeProperties::name, GraphExp);

 
 boost::graph_traits < MyGraphType >::vertex_descriptor Sidius, Vader, KusoKing, ObiLee, PrinceBala, SkyJoger;

 boost::graph_traits < MyGraphType >::edge_descriptor S_V, S_K, V_O, K_O, K_P, O_S;
 //the bool flag returned is false and the returned edge descriptor points to the already existing edge
 std::pair<boost::graph_traits < MyGraphType >::edge_descriptor, bool> ResultOfAddEdge;


 // 把 vertex_descriptor 塞入 graph , 並得到 graph_trait 的vertex_description
 Sidius = add_vertex(VertexProperties(0,"Sidius"), GraphExp);
 Vader = add_vertex(VertexProperties(1,"Vader"), GraphExp); 
 KusoKing = add_vertex(VertexProperties(2,"KusoKing"), GraphExp); 
 ObiLee = add_vertex(VertexProperties(3,"Obi Lee"), GraphExp);
 PrinceBala = add_vertex(VertexProperties(4,"Prince Bala"), GraphExp);
 SkyJoger = add_vertex(VertexProperties(5,"SkyJoger"), GraphExp);

 //儲存 edge descripter
 ResultOfAddEdge = add_edge( Sidius, Vader, GraphExp);
 S_V = ResultOfAddEdge.first;
 ResultOfAddEdge = add_edge( Sidius, KusoKing, GraphExp);
 S_K = ResultOfAddEdge.first;
 ResultOfAddEdge = add_edge( Vader, ObiLee, GraphExp);
 V_O = ResultOfAddEdge.first;
 ResultOfAddEdge = add_edge( KusoKing, ObiLee, GraphExp);
 K_O = ResultOfAddEdge.first;
 ResultOfAddEdge = add_edge( KusoKing, PrinceBala, GraphExp);
 K_P = ResultOfAddEdge.first;
 ResultOfAddEdge = add_edge( ObiLee, SkyJoger, GraphExp);
 O_S = ResultOfAddEdge.first;

 // 嘗試印出現在的 graph tree
 graph_traits< MyGraphType >::vertex_iterator v_i, v_end;
 v_i = vertices(GraphExp).first;
 v_end = vertices(GraphExp).second;
 graph_traits< MyGraphType >::out_edge_iterator e_i, e_end;
/*
 for(; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   //std::cout<< " " << getEid[*e_i] << getEname[*e_i] <<" ";  // test ok
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] << " ";
  } 
  std::cout << std::endl; 
 }
 std::cout << std::endl;
*/
 //BFS
 // a vector to hold the discover time property for each vertex

 std::vector < graph_traits < MyGraphType >::vertex_descriptor > dtime(num_vertices(GraphExp));
 graph_traits < MyGraphType >::vertices_size_type time = 0;
 unsigned int* p_bfs_result = new unsigned int[num_vertices(GraphExp)];

 first_bfs_visitor <   graph_traits < MyGraphType >::vertex_descriptor * > b_vis(&dtime[0], time, p_bfs_result);

 breadth_first_search(GraphExp, KusoKing, visitor(b_vis));

 std::cout << "BFS discovery: ";
 for (int i = 0; i < b_vis.m_time; ++i)
  std::cout << getname[p_bfs_result[i]] << getid[p_bfs_result[i]] << " ";//std::cout << getname[dtime[i]] << dtime[i] << " ";
 std::cout << std::endl;

 delete [] p_bfs_result;


 //DFS
 //property_map<MyGraphType, vertex_color_t >::type cmap = get( &VertexProperties::color_t, GraphExp);

 

 std::vector < graph_traits < MyGraphType >::vertex_descriptor > ftime(num_vertices(GraphExp));
 time = 0;
 unsigned int* p_dfs_result = new unsigned int[num_vertices(GraphExp)];

 first_dfs_visitor < graph_traits < MyGraphType >::vertex_descriptor * > d_vis(&ftime[0], time, p_dfs_result);

 depth_first_search(GraphExp , d_vis, get( &VertexProperties::color, GraphExp), KusoKing);

 std::cout << "DFS discovery: ";
 for ( i = 0; i < d_vis.m_time; ++i)
  std::cout << getname[p_dfs_result[i]] << getid[p_dfs_result[i]] << " ";//std::cout << getname[ftime[i]] << ftime[i] << " ";
 std::cout << std::endl;
 delete [] p_dfs_result;

 // 嘗試 delete 一些 edge 跟 vertex
 // void remove_edge(vertex_descriptor u, vertex_descriptor v,adjacency_list& g)

 remove_edge( Sidius, KusoKing, GraphExp );
 remove_edge( KusoKing, PrinceBala, GraphExp );


 for(v_i = vertices(GraphExp).first; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] <<" ";
  } 
  std::cout << std::endl;

 }
 std::cout << std::endl;


 //void remove_vertex(vertex_descriptor u, adjacency_list& g)
 remove_vertex( KusoKing, GraphExp );

 v_end = vertices(GraphExp).second;
 for(v_i = vertices(GraphExp).first; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] <<" ";
  } 
  std::cout << std::endl;

 }
 std::cout << std::endl;


 return 0;
}

2006年6月29日 星期四

分享一下 Boost Graph Library (BGL) 的心得

貼一段自己寫的 BGL example,服用之後可增一星期功力,免於遭受BGL Document 裡面一大堆 template 的騷擾。內容包擴 directed graph,BFS,DFS,其他的東西就請看倌自己去boost.org翻文件了。

 

 

#include <boost/config.hpp>
#include <iostream>
#include <vector>
#include <utility>
#include <string>

#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp> // for boost::make_list
#include <boost/property_map.hpp>
#include <boost/graph/graph_traits.hpp>

// for BFS
#include <boost/graph/breadth_first_search.hpp>
#include <boost/pending/indirect_cmp.hpp>
#include <boost/pending/integer_range.hpp>

// for DFS
#include <boost/graph/depth_first_search.hpp>

/*
目標 tree (edge direction 全向下)

        0 Sidius
         /   \
    1 Vader   2 KusoKing
         \   /    \
      3 Obi Lee    4 Prince Bala
         /
    5 SkyJoger

1. 建構 tree
2. 進行 BFS DFS
3. 拆tree
*/

// 記得 using namespace !
using namespace boost;
using namespace std;

struct VertexProperties
{
 // add_edge() 會使用此建構子
 VertexProperties() {}
 VertexProperties(int i, const std::string& n) : index(i) ,name(n) { }
 std::size_t index;
 std::string name;

 boost::default_color_type color; // usage unknown :P
 boost::vertex_color_t color_t; // usage unknown :P
};


template < typename FirstContainer >
    class first_bfs_visitor : public default_bfs_visitor
{
 
public:

 // member data 
 FirstContainer m_map;
 typename property_traits < FirstContainer >::value_type & m_time;
 typedef typename property_traits < FirstContainer >::value_type T;
 
 //手賤型 constructor
 first_bfs_visitor(FirstContainer tmap, T & t):m_map(tmap), m_time(t) { }


 // override the visitor function
 template < typename Vertex, typename Graph >
  void discover_vertex(Vertex u, const Graph & g) const
 {
  put(m_map, u, m_time++);
 }

};

template < typename FirstContainer >
    class first_dfs_visitor : public default_dfs_visitor
{

public:

 // member data 
 FirstContainer m_map;
 typename property_traits < FirstContainer >::value_type & m_time;
 typedef typename property_traits < FirstContainer >::value_type T;

 //手賤型 constructor
 first_dfs_visitor(FirstContainer tmap, T & t):m_map(tmap), m_time(t) { }


 // override the visitor function

 template < typename Vertex, typename Graph >
 void initialize_vertex(Vertex u, const Graph& g)
 {

 }
 template < typename Vertex, typename Graph > 
 void start_vertex(Vertex u, const Graph& g)
 {
  
 }
 template < typename Vertex, typename Graph >
 void discover_vertex(Vertex u, const Graph & g) const
 {
  put(m_map, u, m_time++);
 }
 /*
 template < typename Vertex, typename Graph >
 void examine_edge(Edge u, const Graph& g)
 {
   
 }
 template < typename Vertex, typename Graph >
 void tree_edge(Edge u, const Graph& g)
 {
   
 }
 template < typename Vertex, typename Graph >
 void back_edge(Edge u, const Graph& g)
 {
    
 }
 template < typename Vertex, typename Graph >
 void forward_or_cross_edge(Edge u, const Graph& g)
 {
   
 }
 */
 template < typename Vertex, typename Graph >
 void finish_vertex(Vertex u, const Graph& g)
 {
   
 }
};

 

int main(int, char*[])
{

 typedef adjacency_list<vecS,
         vecS,
         directedS,
         VertexProperties
         > MyGraphType;
 MyGraphType GraphExp;

 property_map<MyGraphType, std::size_t VertexProperties::*>::type
  getid = get(&VertexProperties::index, GraphExp);
 property_map<MyGraphType, std::string VertexProperties::*>::type
  getname = get(&VertexProperties::name, GraphExp);
 
 boost::graph_traits < MyGraphType >::vertex_descriptor Sidius, Vader, KusoKing, ObiLee, PrinceBala, SkyJoger;


 // 把 vertex_descriptor 塞入 graph , 並得到 graph_trait 的vertex_description
 Sidius = add_vertex(VertexProperties(0,"Sidius"), GraphExp);
 Vader = add_vertex(VertexProperties(1,"Vader"), GraphExp); 
 KusoKing = add_vertex(VertexProperties(2,"KusoKing"), GraphExp); 
 ObiLee = add_vertex(VertexProperties(3,"Obi Lee"), GraphExp);
 PrinceBala = add_vertex(VertexProperties(4,"Prince Bala"), GraphExp);
 SkyJoger = add_vertex(VertexProperties(5,"SkyJoger"), GraphExp);

 // 目前無須儲存 edge descripter
 add_edge( Sidius, Vader, GraphExp);
 add_edge( Sidius, KusoKing, GraphExp);
 add_edge( Vader, ObiLee, GraphExp);
 add_edge( KusoKing, ObiLee, GraphExp);
 add_edge( KusoKing, PrinceBala, GraphExp);
 add_edge( ObiLee, SkyJoger, GraphExp);

 // 嘗試印出現在的 graph tree
 graph_traits< MyGraphType >::vertex_iterator v_i, v_end;
 v_i = vertices(GraphExp).first;
 v_end = vertices(GraphExp).second;

 graph_traits< MyGraphType >::out_edge_iterator e_i, e_end;


 for(; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] <<" ";
  } 
  std::cout << std::endl;
  
 }
 std::cout << std::endl;


 
 //BFS
 // a vector to hold the discover time property for each vertex
 std::vector < graph_traits < MyGraphType >::vertices_size_type > dtime(num_vertices(GraphExp));
 graph_traits < MyGraphType >::vertices_size_type time = 0;

 first_bfs_visitor < graph_traits < MyGraphType >::vertices_size_type * > b_vis(&dtime[0], time);

 breadth_first_search(GraphExp, Sidius, visitor(b_vis));

 std::cout << "BFS discovery: ";
 for (int i = 0; i < num_vertices(GraphExp); ++i)
  std::cout << getname[dtime[i]] << dtime[i] << " ";
 std::cout << std::endl;

 //DFS
 //property_map<MyGraphType, vertex_color_t >::type cmap = get( &VertexProperties::color_t, GraphExp);
 
 

 std::vector < graph_traits < MyGraphType >::vertices_size_type > ftime(num_vertices(GraphExp));
 time = 0;
 
 first_dfs_visitor < graph_traits < MyGraphType >::vertices_size_type * > d_vis(&ftime[0], time);

 

 depth_first_search(GraphExp , d_vis, get( &VertexProperties::color, GraphExp), Sidius);

 

 std::cout << "DFS discovery: ";
 for ( i = 0; i < num_vertices(GraphExp); ++i)
  std::cout << getname[ftime[i]] << ftime[i] << " ";
 std::cout << std::endl;
 

 // 嘗試 delete 一些 edge 跟 vertex
 // void remove_edge(vertex_descriptor u, vertex_descriptor v,adjacency_list& g)
 // 沒存 edge descriptor , 所以用這個
 remove_edge( Sidius, KusoKing, GraphExp );
 remove_edge( KusoKing, PrinceBala, GraphExp );


 for(v_i = vertices(GraphExp).first; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] <<" ";
  } 
  std::cout << std::endl;

 }
 std::cout << std::endl;


 //void remove_vertex(vertex_descriptor u, adjacency_list& g)
 remove_vertex( KusoKing, GraphExp );

 v_end = vertices(GraphExp).second;
 for(v_i = vertices(GraphExp).first; v_i!=v_end; ++v_i)
 {
  std::cout << getid[*v_i] << getname[*v_i] <<" ";

  boost::tie(e_i,e_end) = out_edges(*v_i, GraphExp);
  for (; e_i != e_end; ++e_i)
  {
   std::cout<< getid[target(*e_i, GraphExp)] << getname[target(*e_i, GraphExp)] <<" ";
  } 
  std::cout << std::endl;

 }
 std::cout << std::endl;


 return 0;
}

 

2006年5月11日 星期四

為什麼要學3D?



 

 

另人心情惡劣的一天被問到一個另人心情更惡劣的問題,答案由Keroro軍曹替我回答。

2006年5月7日 星期日

Helloween 的重金屬國歌

        在這邊放上兩首 Helloween 老歌,"Future World" 及 "I Want Out"。這兩首歌的年紀都快二十歲了,但是到了今天它們的歌詞一樣能打動人心。

 

        "Say the word "tomorrow" without fear"

人生幾何能到達這個境界? 想到未來的時候,心理能夠沒有一絲的恐懼?

 

       There's a million ways to see the things in life
     a million ways to be the fool
     in the end of it, none of us is right
     sometimes we need to be alone

世界上幾百萬人對人生有幾百萬種的看法,如果堅持自己的看法一定是對的,那麼就是把世界上其他的幾百萬人都當成白癡了。

 

        歐洲無數的樂團都是練Helloween 的歌起家不是沒有原因的,世界上音樂的潮流雖然一直在改變,但是聽音樂的人類卻是不變的。或許有一天人類不再害怕未來,彼此之間能夠相互尊重,那麼這兩首歌就會被重金屬迷給遺忘,不再把它們當成國歌了。

 

 


 

If you're out there all alone
And you don't know where to go to
Come and take a trip with me to Future World

And if you're running through your life
And you don't know what the sense is
Come and look how it could be, in Future World

We all live in happiness our life is full of joy
We say the word "tomorrow" without fear

The feeling of togetherness is always at our side
We love our life and we know we will stay

<Chorus>

Cause we all live in Future World
A world that's full of love
Our future live will be glorious
Come with me--Future World

You say you'd like to stay,
But this is not your time
Go back, find your own way to Future World

Life can be for living
Just try and never give in
Tell everyone the way of Future World

One day you'll live in happiness
With a heart that's full of joy
You'll say the word "tomorrow" without fear
The feeling of togetherness will be at your side
You'll say you love your life and you'll know why

<Chorus>

(Solo both/Kai/both)

Scream it out

<Chorus>

 

 

 


 

[Music + lyrics: K. Hansen]

From our lives' beginning on
we are pushed in little forms
no one asks us how we like to be
in school they teach you what to think
but everyone says different things
but they're all convinced that
they're the ones to see

[Bridge:]
So they keep talking and they never stop
and at a certain point you give it up
so the only thing that's left to think is this

[Chorus:]
I want out--to live my life alone
I want out--leave me be
I want out--to do things on my own
I want out--to live my life and to be free

People tell me A and B
they tell me how I have to see
things that I have seen already clear
so they push me then from side to side
they're pushing me from black to white
they're pushing 'til there's nothing more to hear

[Bridge:]
But don't push me to the maximum
shut your mouth and take it home
'cause I decide the way things gonna be

[Chorus:]
I want out--to live my life alone
I want out--leave me be
I want out--to do things on my own
I want out--to live my life and to be free

There's a million ways to see the things in life
a million ways to be the fool
in the end of it, none of us is right
sometimes we need to be alone

[Solo: Kai/Both]

No no no, leave me alone

[Chorus:]
I want out--to live my life alone
I want out--leave me be
I want out--to do things on my own
I want out--to live my life and to be free



2006年5月1日 星期一

教召的感覺

要如何形容教召呢?

沒當過兵的人可以這樣想 :

 

1. 想像有一種渡假村,它邀請你去渡假時,無故不去的話就要坐牢。

 

2. 進了這間渡假村,就必需換上綠色的囚服,意思就像臨時演員要穿戲服是一樣的。

 

3. 渡假村裡的設備又舊又爛,衣褲床舖沒破沒發霉就算是高級。居住的房舍跟廢墟唯一不同的地方,就是廢墟的浴廁不會這麼臭。

 

4. 渡假村唯一的賣點就是"打靶"。為了打六發子彈就會浪費每位渡假會員最少三天的時間。

 

5. 因為渡假村實在太爛了,國家會每日最少賠償會員700台幣。

 

6. 去渡假可以請公假,因為讓人民穿綠色囚服做戲,是國家的重大政策。

 

 

當過兵的可以這樣想:

 

1. 國軍請你回去示範擺老。

 

2. 退伍前擺老沒擺夠的人有福了,不管退伍前得罪長官也好,黑到被新兵瞧不起也好,一雪前恥的機會來了!  身為教召兵沒有過去,軍隊中最老的士官長都會叫你"學長",行軍時請勿標齊對正!!

2006年1月5日 星期四

演唱會又來了!!

Edguy 要來臺灣啦!!

-----------------------------------------------------

www.edguy.nu  剪下來的消息

Mar 19 (TW) TAIPEH, Family Theater
Mar 21 (CHI) HONGKONG, Hitec Auditorium
Mar 24 (CHI) PEKING, Red Hall

-----------------------------------------------------

3月19 日台苯的家庭劇院??

 

應該是台北市政府親子劇場吧 ~

 

之後Edguy還要勇闖北京,真是太勇敢啦!

 

當地的文化管理部門把他們當成德國來的"新好男孩"嗎?

 

-----

 

活到 2006 真好!!