Projective Space Example

The example on this page attempts to show, not just how to create an image in FriCAS but also how to use it with other programs.

I wanted to make the image on the right to illustrate the topology of projective space discussed on this page.

We can use FriCAS to generate a parametric surface.

In this case, for all x,y then z=x*y

We can do this by using the following SPAD code:

projective space
This code generates the 3D surface and also a 2D grid which we can use to texture the surface.
)expose SCartesian
)expose SArgand
)expose SConformal
)expose SceneIFS
)expose SceneNamedPoints
)expose STransform
)expose SBoundary
)expose ExportXml

DF ==> DoubleFloat
PT ==> SCartesian(3)
xyfn(x:DF,y:DF):DF == x*y
view := boxBoundary(sipnt(0,-500)$PT,sipnt(1200,500)$PT)
sc := createSceneRoot(view)$Scene(PT)
tr2 := addSceneTransform(sc,identity()$STransform(PT))$Scene(PT)
gd := addPlot2Din3D(tr2,xyfn,-1..1,-1..1,49)$Scene(PT)
writeX3d(sc,"projectiveSpace.x3d")


PT ==> SArgand
view2 := boxBoundary(sipnt(0,-500)$PT,sipnt(1200,500)$PT)
sc := createSceneRoot(view2)$Scene(PT)
gd := addSceneGrid(sc,view2)$Scene(PT)
writeSvg(sc,"grid.svg")

First we use a program called Inkscape to convert the grid from a SVG file to a PNG file. (that is convert from a vector format to a raster format)

In Inkscape

Start Inkscape

open grid.svg

export it as grid.png

 

We now import this into Blender and do the following:

In Blender

Start blender and remove default cube projective space example
select camera view projective space example
import projectiveSpace.x3d file projective space example
rotate shape so we can see the corners starting to move together. projective space example
  projective space example
Now select the object and add material to it projective space example
remove spectial effects projective space example
select material and add texture projective space example
create new image and animation projective space example
open (not new) file: grid.png projective space example

in Render tab

Set alpha channel

 

projective space example
  projective space example
Render projective space example
  projective space example
  projective space example

Further Information


metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

flag flag flag flag flag flag Axiom Volume 1: Tutorial. Documentation is freely availible from: http://www.axiom-developer.org/axiom-website/documentation.html

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.