Configuring an Angular app with a CSS preprocessor

While setting up an Angular project, if we want to use some CSS preprocessor like SCSS or LESS, it would be a great idea if every time while generating a new component the preprocessor file get generated instead of plain CSS. We can do with `–style’ option as follows:

ng new newApp --style=less

For an existing application, we can make the following changes in the “defaults” object in .angular-cli.json in order to achieve this configuration.

"defaults": {
"styleExt": "less",
"component": {}

“Rise of OpenGL” and Qt

This post describes my Internet search and findings about OpenGL and other related tools. Post contains excerpts and links from referred websites.

Graphical Kernel System (GKS)

The Graphical Kernel System (GKS) was the first ISO standard for low-level computer graphics, introduced in 1977 [0].

GKS defines a common interface to interactive computer graphics for application programs. GKS has been designed by a group of experts representing the national standards institutions of most major industrialized countries. The full standard provides functional specifications for some 200 subroutines which perform graphics input and output in a device independent way. Application programs can thus move freely between different graphics devices and different host computers. For the first time graphics programs have become genuinely portable [1].


From Wikipedia page of GKS, I found that a descendant of GKS was PHIGS. I explored PHIGS and following is the useful excerpt from Wikipedia page of PHIGS:

PHIGS is an API standard for rendering 3D computer graphics, at one time considered to be the 3D graphics standard for the 1990s. Instead a combination of features and power led to the rise of OpenGL, which became the most popular professional 3D API of the 1990s [2].

PHIGS was designed in the 1980s, inheriting many of its ideas from the Graphical Kernel System of the late 1970s, and became an ANSI (ANSI X3.144-1988), FIPS (FIPS 153) and then ISO standard (ISO/IEC 9592 and ISO/IEC 9593) by 1989. Due to its early gestation, the standard supports only the most basic 3D graphics, including basic geometry and meshes, and only the basic Gouraud, “Dot”, and Phong shading for rendering scenes. Features considered standard today, notably texture mapping, were not supported, nor were many machines of the era physically capable of it (at least in real time).

But PHIGS had its own limitations and given the low performance systems of the era and the need for high-performance rendering, OpenGL was generally considered to be much more “powerful” for 3D programming. PHIGS fell into disuse [2].

Rise of OpenGL

By the early 1990s, SGI was a leader in 3D graphics for workstations. Their IRIS GL API was considered state-of-the-art and became the de facto industry standard, overshadowing the open standards-based PHIGS. This was because IRIS GL was considered easier to use, and because it supported immediate mode rendering. By contrast, PHIGS was considered difficult to use and outdated in terms of functionality [3].

IRIS GL (Integrated Raster Imaging System Graphics Library) was a proprietary graphics API created by Silicon Graphics Inc. (SGI) for producing 2D and 3D computer graphics on their IRIX-based IRIS graphical workstations. Later SGI removed their proprietary code, reworked various system calls, and released IRIS GL as the industry standard OpenGL [5].

You can read the whole history at:


OpenGL (Open Graphics Library) is a cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is typically used to interact with a GPU, to achieve hardware-accelerated rendering. OpenGL was developed by Silicon Graphics Inc. (SGI) from 1991 and released in January 1992 and is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group [3].

OS and Platform Independent

In addition to being language-independent, OpenGL is also platform-independent. The specification says nothing on the subject of obtaining, and managing, an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering, providing no APIs related to input, audio, or windowing [3].

OpenGL is supported on every major operating system, it works with every major windowing system, and it is callable from most programming languages. It offers complete independence from network protocols and topologies. All OpenGL applications produce consistent visual display results on any OpenGL API-compliant hardware, regardless of operating system or windowing system [4].


Qt it is a cross-platform application and UI framework that is widely used for developing application software with a graphical user interface (GUI), and also used for developing non-GUI programs such as command-line tools and consoles for servers. It has excellent documentation, wiki and learning videos. I would request to readers to please please please see this small video that made me fan of Qt:

I quote for Qt as:

Qt is like air, it is everywhere.

Integration of Qt and OpenGL (The Great Combination)

Qt provides support for integration with OpenGL implementations on all platforms, giving developers the opportunity to display hardware accelerated 3D graphics alongside a more conventional user interface [6].

Further I found Qt3D. Qt3D was created to simplify the usage of the OpenGL standard API within a Qt application. Qt3D is a set of C++ APIs for 3D programming built on top of QtOpenGL. QtOpenGL is a port of the OpenGL API to the Qt toolkit. It does a fairly good job at translating all of OpenGL basic functions to a Qt widget. Qt3D is currently available as add-on to basic Qt 5.0 package [] .

Even the essential module Qt Gui in addition to simplify the writing of OpenGL code, also contains a few math classes to aid with themost common mathematical operations related to 3D graphics.

Also from videos section of Qt website, found some very useful videos on Modern Shader based OpenGL techniques and OpenGL with Qt 5.

Moreover, there are number of APIs and glue libraries available for easy and graceful implementation of OpenGL such as following:

At the end, I can conclude that Qt + OpenGL is capable of handling today’s modern and sophisticated 3D graphics for any sort of requirement.









Cross section in BRL-CAD

Making a cross-sectional view of a model in BRL-CAD is very easy and fun. All we have to know is just “rt” command and some of its arguments. Following are quick steps to create cross-section of a model:

  1. Open MGED and create / draw model.
  2. Use command saveview fileName  to save the current view of model in a file(shell script).
  3. Run the file generated in step 2 with rt command as:
    sh fileName -s1024 -k 0,-5,0,2000
  4. Step 3 create image in raw format i.e. pix format.
  5. Convert pix image to png as:
    pix-png -s1024 < fileName.pix > fileName.png

The option ‘k’ of “rt” take input as: xdir, ydir, zdir, distance. Here xdir, ydir and zdir define the orientation of cutting plane. The line through Point(xdir, ydir, zdir) is normal to cutting plane. This normal always points away from the space to be subtracted. Since as in 3D geometry, to define a plane we need a normal to that plane. Same is here.

The “distance” is distance of plane from origin. That is, distance specifies position of plane w.r.t. to origin.


We know there are so many users in Ubuntu system other than our sudo account which are not created by us but by system to cater different tasks in the system. Run the command cat /etc/passwd to see all users in the system. One of them is www-data. Whatever you do from browser, it is recorded as work done as www-data. For example, if you create a file from browser, its owner will be www-data. In simple language, browser is www-data user of your system. It is also called Apache user account or webserver account.If you run command, ps -u www-data you will see  number of Apache processes running and their process ids. This command shows all the running processes under a given user. So by checking the processes of the www-data we can conclude that it is Apache’s account. Continue reading www-data