Monthly Archives: August 2014

Compilers in .NET vNext my KulenDayz session

Next week I am going to KulenDayz event the most exciting and unique MSCommunity conference in the region. It will be my second time I am participating on the conference as a speaker. The KulenDayz IT conference is organized by Croatian Microsoft Community, mainly by .NET User Group from Osijek. The conference will be held in Osijek from 5th to 7th of September. The conference will gather the most important MSCommunity influencers from the Balkan and East Europe. Most of this guys are also Microsoft MVP from various expertize. The conference is organized thought 55 sessions in 8 tracks from the classic development to the Microsoft Azure, case studies etc. Between sessions there will be various interesting events, opportunity to make connection and meet various experts. Besides a good networking on the conference, I am very happy I going to see my friends from the region.

The uniqueness of the conference is the motto: Slow Down, which trying to tell every participant to be relaxed and to enjoythe event without any stress. Beside the motto and the way how it is organized, this is not all what guys from Osijek will offer this time. Actually there is a catch in one of 8 conference track. It is so special. It is KuelnDayz Kindz track which will offer IT sessions for kinds between 7-12.

As a KulenDayz speaker I will deliver session about very cool stuff coming with the next version of the .NET. The session will be a story about compilers in .NET vNext and how Microsoft brings innovation in to C# and VB compilers platform and the new 64 bit JIT compilers socalled RyuJIT compiler. Also the session will bring the news about .NET Native compiler. It is a new generation of .NET Native  compiler which .NET application compiles in to native application like C++ compiler does.

My session will start at 11:00 on advanced development track at Saturday 6th of September.

Meet you there.

Analitička geometrija i C# programiranje dio 6/n

Problem 6: Ugao između prave i ravni.

Pretpostavimo da imamo pravu p na kojoj poznajemo koordinate tačaka A i B. Također pretpostavimo da imamo ravan Π koja je definisana tačkom na ravni R i vektorom normale V. Potrebno je izračunati ugao alpha  kojeg obrazuje prava i ravan.

Rješenje: Rješenje zadatka svodi se na izračunavanje ugla između vekktora prave p i njene projektcije na ravan Π p'. Kako već imamo vektor prave p, još je samo potrebno da se odredi vektor prave p’ koja predstavlja projekciju prave na ravan. S druge strane znamo da je vektor normale okomut na vektor smijera projektovane prave, pa je traženi ugao komplement ugla koji zatvara parava i vektor normale. Na osnovu ovog imamo:

cos (90- \alpha) = \frac {|p \cdot V|}{\left | p \right |\left | V \right |}

Implementacija u C# izgleda kao na sljedećem listingu:

static void Main(string[] args)
    //Zadatak 1: data je ravan 2x-y+z-6=0 i prava (x)/-1 = (y-1)/-1 ) (z-6)/1
    //ulazni podaci za zadatak 1.
    Point B  = new Point(2f,  4f,  0f);      //tacka na pravoj
    Point A  = new Point(0f,  1f, -1f);   //tačka na pravoj
    Point R  = new Point(0f,  0f,  6f);     //tacka na ravni
    Point Vn = new Point(2f, -1f,  1f);   //vektor normalne ravni

    //izracunavanje ugla
    //Vektor pravca kojeg obrazuju tacke A i B
    Point zraka = Point.Vector(A,B);
    var vec = Point.CrossProduct(zraka, Vn);
    float scos_alpha = (float)(Point.Modul(vec) / (Point.Modul(Vn) * Point.Modul(zraka)));
    Console.WriteLine("Cosinus ugla alpha iznosi={0}", scos_alpha);

Klasa Point je implementirana u prethodnom postu.

Get every new post delivered to your Inbox.

Join 672 other followers