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.

Advertisements

www-data

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

Presentation on WordPress Plugin

Creating WordPress Plugin: Experience and Efforts

Finally, today I give presentation on “Creating WordPress Plugin”. Actually I was working on project of creating website in WordPress. It is so easy to “Add New Page”,  “Add New Post”, “Add / Install Plugin” etc. So in the whole project I did nothing that suites to CSE / IT student. Rai Sir suggested us (me & Vigas) to start exploring WordPress as developer and learn how to create Plugin. I finished my pending works of this project and started exploring the Internet and http://codex.wordpress.org.

Wrong Approach

Initially I started following a tutorial, in which they created plugin with widget settings but with little description about functions, variables etc. I read it again and again to understand thoroughly, but not satisfied. To get started, I decide to create  a simple plugin, so I copied the code from that tutorial and kept only those basic parts, relevant to my simple plugin. Similarly, I add widget too. This whole process took my lot of effort but with less satisfaction.

Right Approach

Then I come back to main wordpress site. I directly go to “Writing a Plugin” and started reading and exploring more links to function definitions. In this way, I got understanding about the working of functions.

It was in my case that I got link in which much description was not given. It may be possible that one may found a highly informative and descriptive blog  which may act as right approach. for him.

Download my presentation from: Presentation.pdf