“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
In rectangular coordinates: You cannot have a function who’s graphic resembles a cat.
Because a cat is a closed shape, and for a given x, f(x) must be unique. It’s the pure definition of “function”.
But you can have 2 functions: f1 draws the back of the cat, f2 draws the belly.
In polar coordinates: yes you can design a function with a “cat” like graphic. No radial line shall intersect the cat twice.
No mater how complicated a graph is, there always is a function to describe it. As long as the “function” definition is not break: for a given x in the input range, there must be EXACTLY ONE y such that f(x) = y
Make a definition to draw a cat with a certain size parameter.
Depending on the height or width, we can define a new ratio of each body part like legs or head which should be pre-defined functions.
Have a bitmap file or use one. Take the size input, say x. Repeat each bit x times horizontally and vertically. i.e. for each bitmap element create a square of the corresponding size.
F(x) = a cat of size x.
In rectangular coordinates: You cannot have a function who’s graphic resembles a cat.
Because a cat is a closed shape, and for a given x, f(x) must be unique. It’s the pure definition of “function”.
But you can have 2 functions: f1 draws the back of the cat, f2 draws the belly.
In polar coordinates: yes you can design a function with a “cat” like graphic. No radial line shall intersect the cat twice.
No mater how complicated a graph is, there always is a function to describe it. As long as the “function” definition is not break: for a given x in the input range, there must be EXACTLY ONE y such that f(x) = y
Make a definition to draw a cat with a certain size parameter.
Depending on the height or width, we can define a new ratio of each body part like legs or head which should be pre-defined functions.
You can define functions to draw an oval, circle, arc etc. and you can use the following to draw a side view:
draw a circle where the face is required. draw circle for eyes, draw oval for the back/belly, draw arc for the tail, etc.
Have a bitmap file or use one. Take the size input, say x. Repeat each bit x times horizontally and vertically. i.e. for each bitmap element create a square of the corresponding size.
F(x) = a cat of size x.
Leave an Answer/Comment