Updates from Theo Yap Toggle Comment Threads | Keyboard Shortcuts

  • Theo Yap 4:19 pm on May 21, 2017 Permalink | Reply

    Photo-*chuckles*-SYNTHESIS :D heeeh? HEEEEH?! *cricket noises* 

    Well… That was fast… but OK. Definitely not an easy semester, but can’t say it wasn’t a good learning experience.

    Linear transformations and matrices made the most impact on me even if they were the ones I had a hard time understanding. These topics are used a lot in VFX, which is something I love and am very passionate about. There’s a certain bliss in learning how something you like very much works, and in a way, it gives meaning to what you do. I also liked Fourier Transform even if we just brushed over it briefly. It felt tangible, and that makes sense to me. Also, apparently you can use it to encrypt and decrypt information, and that intrigues me.

    This course has been… stressful to say the least, but I think that’s my problem since I really just have a hard time understanding these kinds of math as opposed to say AI.

    Well, my message to the class… hm… It’s no secret that I’m delayed, and most if not all of the subjects I’m taking right now are being taken by Batch 2014. To be taking 3rd year subjects with batch 2014 is humbling to say the least, but I guess the entire UP experience is humbling haha. I didn’t get to interact with you all so much except for the groups, but I had fun taking the class with all of you. And to Sir Paul, thank you for being patient with all of us (and I think especially me, I know I’m not the brightest student, and a not very easy one to teach), and thank you for making the classes more lively with your unconventional activities and teaching methods. It makes the hardcore math way more bearable. Also, congrats Sir!

    I wish everyone the best. Good luck to you all!

  • Theo Yap 2:20 pm on May 15, 2017 Permalink | Reply

    “I’m in. #hackerman” 

    Fourier Transform can be used in image encryption and decryption. The method in which images are encrypted and decrypted use random phase masking.

    Two random matrices are instantiated, and these will be treated as our keys. To encrypt, image is multiplied by the first random matrix then Discrete Fractional Fourier Transform (DFRFT) of order alpha is applied (this is phase masking). The result is then multiplied with the second random matrix, then DFRFT of order beta is applied. To decrypt, one simply works in reverse. You first apply DFRFT of order beta-prime on the encrypted image then  multiply the encrypted image with the inverse of the second random matrix. Then, DFRFT of order alpha-prime is applied, after which, the result is multiplied with the inverse of the first random matrix. Basically, to encrypt, you apply some procedures, then to decrypt, you apply the inverse, cancelling out the encryption.

    This works because without the proper parameters/keys, decryption result returns noise, which an image may not be inferred from.fourier

    (image is a screenshot from the work of Mr. Ashutosh; mentioned in the sources)

    Ashutosh, D.S. (2013). Robust Technique for Image Encryption and Decryption Using Discrete Fractional Fourier Transform with Random Phase Masking. Retrieved from http://www.sciencedirect.com/science/article/pii/S2212017313005756

    Hennelly, B.M. & Sheridan, J.T. (2003). Image encryption and the fractional Fourier transform. Retrieved from http://eprints.maynoothuniversity.ie/5809/1/BH-Image-Encryption.pdf

    Sharma, P. (2013). Efficient Image Encryption and Decryption Using Discrete Wavelet Transform and Fractional Fourier Transform. Retrieved from https://arxiv.org/ftp/arxiv/papers/1401/1401.6087.pdf

  • Theo Yap 1:24 pm on May 15, 2017 Permalink | Reply

    "One Shot, One Kill" – US Marine Scout Sniper School 

    Vectors are used in physics to express both magnitude and direction, and almost everything runs on basic kinetic motions.

    The most basic of kinetic motions would be the projectile, which is affected by gravity. However, to become a sniper, one must understand more than just this. A sniper has understanding of gravity (y axis) as well as other factors that affect their shot like wind (x axis), temperature, humidity, bullet weight, muzzle velocity, and other factors that they need to control in order to guarantee or secure a shot every time.



    To sight in a target, the sniper aims their crosshairs at a target, and ideally, the crosshairs are zeroed for a specific rifle, using a specific type of bullet, and at a specific distance. When a rifle is zeroed, it means that a certain distance, given certain weather/external conditions, the rifle will always hit where its crosshairs are sighted on. However, the different external conditions affect the path of the bullet, which can make it hit higher or lower or offset to the right or left. To combat these effects, a sniper can use adjustments (the math of which I will no longer discuss) in order to compensate for the offset, or the sniper can choose to forego making the scope adjustments (to adjust the line of sight) and physically compensate for the shot themselves (raising or lowering the rifle, offset the aim to the left or right). I’d like to think of it in terms of linear combinations in which we can express the zero of a rifle at a certain distance as a zero vector [0 0]. However, external conditions added (vector addition) to the zero vector would offset our shot. So, the adjustments can be represented as coefficients to the vectors going to be added such that when all these vectors are added altogehter (c1v1 + c2v2 + c3v3… cnvn), we eventually achieve our zero vector again, thus giving us a zeroed shot.



    • years obsessing over sharpshooting
    • ROTC Military Science 1, 2, 3 (RSCT), 31, 32, 41, 42
    • US Army Field Manual 23-10: Sniper Training
  • Theo Yap 12:40 pm on May 15, 2017 Permalink | Reply

    “Two Halves of a Whole” – Bruce Lee 

    Chinese martial arts are famous/infamous since more than fighting, it presents itself as an art form and even a way of life.

    One of the key aspects of Chinese martial art is finding the balance within oneself. This balance may be physical, which can be training to the point that you have found your body’s rhythm and becoming one with your movements being almost untouchable or mental and emotional, finding the patience to greet life’s challenges with hope and dignity. Of course, the goal is to achieve both.

    On a more shallow note, the movements in one of my preferred fighting styles (Wing Chun) are symmetric; meaning the moveset for one side of your body is the same and can be applied to the other side. The training method the art is known for is the “Wooden Dummy Form” consisiting of 108 strikes. That is 54 strikes to the left side of the dummy and 54 mirrored strikes to the right. Likewise, single-performed forms also feature the “left-right, left-right” scheme of movement. Even sparring seems to mirror the “balance” that symmetry brings, having two participants mirror each other’s hand movements before they begin freestyle fighting, often which, moves that counter each other can also be treated as symmetric.

    Training both sides of the body makes for a more harmonized and stable fighting style; making stance and combat “natural” should you need to switch stance. I’ve noticed the same pattern in my “Level 1” form for Shaolin Kung Fu and other styles as well.

    In general, the symmetry of the physical aspect ultimately seeks the spiritual balance within oneself to prepare for both physical and emotional challenges.

    disclaimer: Kung Fu way of life, however helpful it may be, is still not to be treated as a substitute for real medical help. If you feel you are suffering something emotional or internal, please consult your doctor.



    • years of obsessing over martial arts
    • Ip Man rare footage (all 3 forms + Wooden Dummy Form): https://www.youtube.com/watch?v=0YnEm1zaUyE
    • Wong Shun Leung – Si Lum Tao (Wing Chun Form 1): https://www.youtube.com/watch?v=crmGYEvLVcw
    • Chi Sao (“Sticking Hands”) sparring: https://www.youtube.com/watch?v=GQEiwQG7Wfc
    • Lee, B. (1997, November 15). Bruce Lee Jeet Kune Do: Bruce Lee’s Commentary on the Martial Way. Clarendon, Vermont: Tuttle
  • Theo Yap 2:57 pm on January 19, 2017 Permalink | Reply

    “Hi, I’m JT.” everyone else: “hi, JT” 

    Hey everyone, my name is John Theodore Yap, but you can call me Theo or JT.

    I finally finished Math 55 after 3 takes, so I’m a bit ecstatic and relieved to finally be taking CS 130, but I’m also a bit scared because as far as I know, CS 130 series is a killer. However, my resolve is refreshed and hopefully a lot stronger, so I’m ready for the challenge.

    I wasn’t that confident in math until I hardcore drilled myself over Math 55, so I’d like to think I’m prepared, but I’ll keep an open mind and an open heart.

    Right now, I’m feeling hopeful, but I don’t want to get my hopes too high or get too cocky.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc
%d bloggers like this: