The Chinese remainder theorem
I hope to do a series covering some theory and implementation of the RSA algorithm in F# in the near future – and one of it’s main ingredients (for simplifying the hard calculations) is the Chinese remainder theorem – so … Continue reading →
Categories: News
toying with lazy sequences and the fixed-point combinator in F#
I recently watched this great cast from Graham Hutton on Channel 9: How to be more productive. Right at the beginning he shows us another application of the fixed-point combinator and this got me into the “Haskell/Lazy love”-mode again. So … Weiterlesen →
Categories: News
a generic polynomial type in F#
In this short article I want to show how to implement a simple polynomial type in F# over a generic field. For this I will use the technique introduced in this great article: Writing generic numeric code So you will … Weiterlesen →
Categories: News
FunTracer: Textures and Fog
In this post I will introduce the concept of textures (and apply it to our plane-primitive) and explain why I choose to add a fog effect. This is the texture we are going to tile to our “floor”: What is … Weiterlesen →
Categories: News
FunTracer: adding planes to the picture
Today we start adding another primitive to the scene – a plane. This is what we are looking for: and here is the code that will finally render this: But before going into the implementation of the Plane.Create method let’s … Weiterlesen →
Categories: News
FunTracer: reflection
It’s time for one of flagship-features of ray tracing: reflection. Indeed this will be rather easy (again) – we basically did have every thing we need already – all that is left is to introduce some recursion in the tracing … Weiterlesen →
Categories: News
FunTracer: specular lightning
This time we are going to add specular lightning – this will add “shiny”ness on objects. The basic idea is simple: we reflect the currently traced ray, at the hit-point (using the normal of the object at this point) and … Weiterlesen →
Categories: News
FunTracer: adding shadow
This time we will see how to add shadows to our scene. Imagine this scene: that is generated by this snippet: The basic idea is to only use a directional light (ambient will always be used) if there is no … Weiterlesen →
Categories: News
FunTracer: the first simple tracer
Finally we will produce some output. And after the work we did so far it will be rather easy. The last “hard” part will be the shading: First (very) simple shading The idea is very simple. A object will reflect … Weiterlesen →
Categories: News
FunTracer: hitting a sphere
In order to trace a ray we have to decide if a given ray hits a object in our scene. In this post I want to show you how to do this for the classic case of a sphere. Indeed … Weiterlesen →
Categories: News
FunTracer: Defining the ray and viewport
This time we will have a look at two types that will help us on your way. First I will show you how I implemented a ray-type for representing the most important aspect of ray-tracing itself and then I will … Weiterlesen →
Categories: News
FunTracer: Intro and let there be light
As I mentioned here I will write a series on Raytracing in F#. Borrowing the famous “fun in coding” theme I choose the name and did bring up a very simple one that will draw colored spheres with a simple … Weiterlesen →
Categories: News
Raytracing side note: “almost zero”
As we will use float-values to do our computations we might run into situations where we get into precision-troubles. It’s because of this problems that we have to consider values the same if they differ by a small amount instead … Weiterlesen →
Categories: News
Vector Fun: dot-product
Today I want to give some information on the dot-product and provide it’s implementation for out Vector-type in F# (this will be trivial). The dot-product will be very important for our Raytracer-project because of it’s many uses in analytic-geometry. You … Weiterlesen →
Categories: News
a simple vector-type in F#
As mentioned here I decided to create my own vector-implementation for 3D vectors. I will start with this here and continually extent this type and it’s helper modules as the need arises for our Raytracer. For now I just want … Weiterlesen →
Categories: News
Next: Raytracing in F#
I decided to do some writing on Raytracing using F# next. I always loved Raytracers (the very first I saw was written in QBasic and just showed a gray scale shaded ball in the center of the screen (maybe with … Weiterlesen →
Categories: News
Connect4 – designing a Silverlight ViewModel
Last time we discussed the implementation details on the Connect4 game in F#. Today I will show you how you can implement a MVVM ViewModel for Silverlight in F#. Ok I use no full-fledged MVVM framework (indeed in only implement … Weiterlesen →
Categories: News
Connect4 – implementing the representation and core mechanics in F#
In this part of the Connect4-series I want to show you my implementation of the game representation and mechanics. Of course we finally want to use the AlphaBeta-algorithm for it so keep this in mind. Representation of the game and … Weiterlesen →
Categories: News
extending Minimax with Alpha-Beta-pruning
Last time we discussed the Minimax-algorithm and I promised to extend it with Alpha-Beta-pruning. Today I want to fulfill this promise. But before starting for real I want to talk a bit of why you want to do this – … Weiterlesen →
Categories: News
