Monday, October 1, 2018

Prolog Software Download - Swi Prolog Software For Artificial Intelligence

The SWI Prolog software is freely available for Programming in Logic. This software is specially used for Artificial Intelligence. There are two versions of SWI Prolog which are 32 bits and 64 bits. You can download it according to your system by clicking on download link given below:

SWI Prolog 64 Bits

SWI Prolog 32 Bits



Reference:
Description By Prolog Official Website 
www.swi-prolog.org

SWI-Prolog is a versatile implementation of the Prolog language. Its robust multi-threading, extended data types, unbounded arithmetic and Unicode representation of text allow for natural representation of documents (e.g., XML, JSON, RDF) and exchange of data with other programming paradigms. Its comprehensive low-level interface to C is the basis for high-level interfaces to C++, Java (bundled), C#, Python, etc (externally available). SWI-Prolog is equipped with an extensive web server (HTTP) framework that can be used both for providing (REST) services and end-user applications based on HTML5+CSS+JavaScript. Pengines (Prolog engines) allow clients to run queries against a client-provided jadwal on a remote server using a generic API. Such programs can be executed in a sandbox.
Equipped with rich interfaces, Prolog is an attractive language for realising applications. Its incremental compilation combined with generally local and backtrackable data structures (undo) allows for patching the jadwal and keep testing it without restarting. Its relational paradigm fits well with tabular data (RDBMS), while its recursive strength fits well with tree and graph shaped data. Prolog can naturally express simple rule sets required to implement the application logic.
Constraints and coroutining attach rules to (changing) data. Combined with backtracking, this can be used to solve many complicated combinatorial problems using a simple declarative specification. Classical examples are puzzles and planning problems.
SWI-Prolog offers a variety of development environments, most of which may be combined at will. The native system provides an editor written in Prolog that is a close clone of Emacs. It provides semantic highlighting based on real time analysis of the code by the Prolog system itself. Complementary tools include a graphical debugger, profiler and cross-referencer. Alternatvely, there is a mode for GNU-Emacs and an Eclipse plugin, both of which may be combined with the native graphical tools. Finally, SWISH provides a web-based environment based on the forementioned Pengines that can both be used to provide sandboxed access or full access after authentication. SWISH offers editing multiple sources using semantic highlighting. SWISH can manage plugins for rendering Prolog data using HTML5+CSS+JavaScript. This can be used to render data as tables, graphs, charts, etc.


This is the solution to your all following search queries:

 download prolog software for artificial intelligence,
swi prolog tutorial
swi prolog editor
download prolog software for artificial intelligence
swi prolog online
how to install prolog on windows
how to use swi prolog
swi prolog tutorialspoint
swi prolog portable
prolog software download
swi prolog editor download
prolog compiler download
how to install prolog on windows 
turbo prolog download
prolog programming language free download
gnu prolog
swi prolog tutorial

Cisco Packet Tracer Download Free

Cisco Packet Tracer is an innovative network simulation and visualization tool. You can download it by clicking on any download link given below:




Further more,



Sunday, September 30, 2018

How To Run Linux Ubuntu On Windows ? Vmware Workstation And Ubuntu Iso File

To run linux on Window, You need VMWare Workstation and Ubuntu Iso file. Then you will install ubuntu iso file on vmware (virtual).

I will recommend you to download this combined link;
VMware + Ubuntu Download Link


However you can also download separately;
VMware Download Link
Ubuntu Download Link

Keys for VMWARE:

  • AG352-4YED3-0852Q-LPXXT-MGKG4
  • FC1R0-2EX4M-H854Y-2NWGE-Q2KXA
  • ZU3EH-0YXD4-4819Q-CFWQZ-MZHX4
  • UF3H2-0ME0J-M8EAY-CMNNT-NZ0ZA
  • GU38K-DJW07-488MY-85YXT-P3HU4
  • YU1R2-8RZ16-4816Y-WYNET-WQUFD
  • VV140-2ZFD1-H88YY-N5X5C-PF8Z6
  • FF7N0-DEX81-H85HP-4ZXZX-YYRU4
  • CU14H-AEZDM-081MZ-RPXQT-WFKG6
  • AA1T2-2KE13-088JQ-JEY7C-WUHT0

For detailed guidance:

Click here to watch How to Install Ubuntu on VMware Worksation



Saturday, November 25, 2017

Introduction

Hello fellows from all over the world.

I've decided to start a blog about my own little 3D Engine I've started making.

Why a 3D Engine you might ask? Well, I got bored a while ago. Bored with all the PHP and Access shite at school. Sounds familiar eh?

I just wanted to know how the 3D stuff of all these epic games worked, and well, I just started creating my own. Just as simple as that, start your own, you might think. Well, it is not.

It's just called 'Engine' for now, and it will do for now. Enough for the personal stuff, lets race ahead to my actual latest version (I started making this blog a tad too late).

Why To Use Tangent Space

You might've been wondering why you see lots of people doing their vector calculations in what they call texture or tangent space. Why can't they just do it in World space for example?

Well, because they want their special texture maps to be portable.

Let's take normals for example: 3D vectors which can be stored in textures to provide detail normals for every pixel on a texture (texel). Textures which store normals are called normal or bump maps. Here's an example of a normal map of a brick wall:

This image has three channels: R, G and B. They're used to store the X, Y and Z amount of a normal that's supposed to be at that given texel. This normal can be used to change surface lighting without having to add geometry. The only downside is that the object will still look flat from a side: it's just a trick to change lighting response, not to add actual depth. Lighting effects are changed because these normals are used in the color calculations, not the linear ones passed by the Vertex Shader.

Now about the colors: red equals to normals pointing along (tangent to) the surface, green equals to normals pointing left (bitangent to) and blue equals to normals pointing up away from the surface.

A pure blue (0,0,255) pixel (the perfect surface normal) will be our test subject.

Let's say we were using this vector as a world space normal. That would work perfectly fine for a surface lying flat on its back. The texture reader would read (0,0,255) and determine the current normal pointing 100% up in World space. Then imagine an object on its belly with this texture. The GPU reading the texture will still read (0,0,255) believing the normal is still pointing up in World space. This is not the case, since the object itself has rotated. Oops.

Looks like we can't just pluck world normals out of a texture, because world normals are object orientation dependant. The normals are relative to the surface the texture is applied on. So, we need to know surface orientation to be able to use these normals. There's no way to store portable world normals in a texture.

But there's always hope: just convert your data which is in stored in World Space to Tangent space.

[Direct3d Hlsl] Normal Mapping Tutorial

For an explanation about why to use tangent space, read this tidbit of text.


Let's assume we're using Direct3D and HLSL.

Converting to Tangent (or texture) space
Normals stored in the texture are surface orientation dependent and are stored in what's called Tangent Space. But all the other lighting components such as view direction are supplied in world space. Because we can't use world space, why not convert every lighting component we need to compare the normal with, to this format called tangent space? Why not compare apples to apples?

Changing coordinate systems requires transformation. I'll just skip the hardcore math, but what I do want to explain here is that we need a matrix to transform world to tangent space. Just like we need a matrix to get world space from object space, we need a matrix to convert to tangent space. Remember this:
  • We need the surface orientation, because that's where the texture normals depend on.
  • We know everything about our surface (a triangle).
  • Any lighting component we need in PS (lightdir,viewdir,surfacedir) needs to be multiplied by the resulting matrix.
/* We need 3 triangle corner positions, 3 triangle texture coordinates and a normal. Tangent and bitangent are the variables we're constructing */


// Determine surface orientation by calculating triangles edges
D3DXVECTOR3 edge1 = pos2 - pos1;
D3DXVECTOR3 edge2 = pos3 - pos1;
D3DXVec3Normalize(&edge1, &edge1);
D3DXVec3Normalize(&edge2, &edge2);

// Do the same in texture space
D3DXVECTOR2 texEdge1 = tex2 - tex1;
D3DXVECTOR2 texEdge2 = tex3 - tex1;
D3DXVec2Normalize(&texEdge1, &texEdge1);
D3DXVec2Normalize(&texEdge2, &texEdge2);

// A determinant returns the orientation of the surface
float det = (texEdge1.x * texEdge2.y) - (texEdge1.y * texEdge2.x);

// Account for imprecision
D3DXVECTOR3 bitangenttest;
if(fabsf(det) < 1e-6f) {

// Equal to zero (almost) means the surface lies flat on its back
tangent.x = 1.0f;
tangent.y = 0.0f;
tangent.z = 0.0f;

bitangenttest.x = 0.0f;
bitangenttest.y = 0.0f;
bitangenttest.z = 1.0f;
} else {
det = 1.0f / det;

tangent.x = (texEdge2.y * edge1.x - texEdge1.y * edge2.x) * det;
tangent.y = (texEdge2.y * edge1.y - texEdge1.y * edge2.y) * det;
tangent.z = (texEdge2.y * edge1.z - texEdge1.y * edge2.z) * det;

bitangenttest.x = (-texEdge2.x * edge1.x + texEdge1.x * edge2.x) * det;
bitangenttest.y = (-texEdge2.x * edge1.y + texEdge1.x * edge2.y) * det;
bitangenttest.z = (-texEdge2.x * edge1.z + texEdge1.x * edge2.z) * det;

D3DXVec3Normalize(&tangent, &tangent);
D3DXVec3Normalize(&bitangenttest, &bitangenttest);
}

// As the bitangent equals to the cross product between the normal and the tangent running along the surface, calculate it
D3DXVec3Cross(&bitangent, &normal, &tangent);

// Since we don't know if we must negate it, compare it with our computed one above
float crossinv = (D3DXVec3Dot(&bitangent, &bitangenttest) < 0.0f) ? -1.0f : 1.0f;
bitangent *= crossinv;

/* and add it to our model buffers */

We need to create a 3x3 matrix to be able to use it to convert object normals to surface-relative ones. This matrix should be built by adding the three components up in a matrix, and then transposing it in de Vertex Shader:

// tangentin, binormalin and normalin are 3D vectors supplied by the CPU
float3x3 tbnmatrix = transpose(float3x3(tangentin,binormalin,normalin));

// then multiply any vector we need in tangent space (the ones to be compared to
// the normal in the texture). For example, the light direction:
float3 lightdirtangent = mul(lightdir,tbnmatrix);

Then we're almost done. The only thing we need to do now is pass all the converted stuff to the Pixel Shader. Inside the same Pixel Shader retrieve the normal from the texture. Now you're supposed to end up with for example the light direction in tangent space. Then do your lighting calculations as you would always do, with the only exception being the source of the normal:

// we're inside a Pixel Shader now
// texture coordinates are equal to the ones used for the diffuse color map
float3 normal = tex2D(normalmapsampler,coordin);


// color is stored in the [0,1] range (0 - 255), but we want our normals to be
// in the range op [-1,1].
// solution: multiply them by 2 (yields [0,2]) and substract one (yields [-1,1]).
normal = 2.0f*normal-1.0f;


// now that we've got our normal to work with, obtain (for example) lightdir 
// for Phong shading
// lightdirtangentin is the same vector as lightdir in the VS around 
// 20 lines above
float3 lightdir = normalize(lightdirtangentin);


/* use the variables as you would always do with your favourite lighting model */

[Direct3d] Handling Lost Devices

Hello and welcome to another topic about 3D programming.

Let's suppose we're programming in Direct3D9.

Today I'll be talking about one of the most annoying problems found in 3D applications: lost devices.

Lost Devices
First things first: what's a lost device anyway? When a device goes in a lost state it means it can't place it's results anywhere. It then isn't able to put it's buffers to any place on screen. This might happen when a user Alt Tabs out of a fullscreen game for example: the GPU then can't place it's frames anywhere anymore, so it becomes lost.

Lost devices can't be fully accessed by the Direct3D API anymore. For example, draw calls will return D3DERR_INVALIDCALL instead of D3D_OK (success). This means you can't tell the GPU to do anything useful anymore. To get it working again, you need to reset it.


Resetting your GPU Card
Just to assure you, you don't need to reset your PC or anything, you only need to empty it's memory manually by software (API). Remember, most of Direct3D's API isn't working anymore. There's just about five calls we can make:
  • devicepointer->TestCooperativeLevel(). Think of this one as a doorbell. No one coming at the door (not returning D3D_OK)? Your GPU is lost.
  • devicepointer->Reset(). This one will wipe GPU RAM and reset all States you've set (like SetRenderState and SetSamplerState).
  • resourceinheritingfromIUnknown->Release(). You need to tell the GPU you don't need resources in GPU RAM anymore with this function. You can't even forget a single resource pointer: it will make your app crash when reseting.
  • resourcebackedupincpuram->OnLostDevice(). Call this on any object that has a backup in CPU RAM.
  • resourcebackedupincpuram->OnResetDevice(). Call this on any object that has a backup in CPU RAM.
As I've said, you need to empty the GPU's memory before you can reset it. One minor note first though: as any experienced PC user does *cough* you make backups *cough*:
  • Resources put in D3DPOOL_DEFAULT are no-backup resources and can be found in the best RAM possible (GPU RAM). If we run out of GPU RAM, we put it in CPU RAM. If we can't store it there, leave it on the drive, crash, or put it in Page File. Clear enough.
  • But we've also got D3DPOOL_MANAGED. These resources are copied to CPU RAM, and only when needed they get copied (not moved) to GPU RAM. This means there's always a backup available of these resources.
Let's put together a TODO-list of our reset then. What needs to be done is (in this order):
  1. Release() any resources that are stored in GPU RAM (D3DPOOL_DEFAULT).
  2. Put any resources that are stored both in GPU RAM and in CPU RAM (D3DPOOL_MANAGED) on hold and remove them from GPU RAM. Do this by calling OnLostDevice() on them.
  3. Reset the device with devicepointer->Reset(D3DPRESENT_PARAMETERS).
  4. Then tell all resources backed up in CPU RAM to copy back to GPU RAM by calling OnResetDevice() on them.
  5. Recreate your resources that were put in D3DPOOL_DEFAULT.
An example
Let's say we've got ourselves a basic engine with the following resources:
  • A GPU font, called ID3DXFont, used to draw our tooltip text on the GPU.
  • The FX Framework, called ID3DXEffect, used to modify shader parameters.
  • A shadowmap (color + depth), created by CreateTexture and CreateDepthStencilSurface. These are IDirect3D9Surface's and a IDirect3D9Texture.
In this case, the reset sequence will look like this:

void D3D::resetD3D() {
// Saveable resources in D3DPOOL_MANAGED
font->OnLostDevice();
FX->OnLostDevice();

// Unsavable resources that don't have a backup
ShadowTex->Release();
ShadowTexTopSurface->Release();
ShadowDepthTopSurface->Release();

// Let's throw everything away
d3ddev->Reset(&d3dpp);

// And copy the CPU RAM resources to GPU RAM
font->OnResetDevice();
FX->OnResetDevice();

// Recreate D3DPOOL_DEFAULT stuff
initD3D(1);
}

I hope this will be clear enough, and if not, tell me!