If matter is just an illusion what is the source of it If whatever we see and feel in the 3-D world is just an illusion created by our minds and every matter, even an atom, is related to each other (interrelated); what is the origin of it? Since consciousness or self or "I" is also just a thought, how is matter created by the consciousness? How does the mind create it? Whenever I think of these things, I remember the mythological god, Zeus, who can create anything he wishes just by thinking about it? It feels like this is actually possible. So what could be the possible logic behind this complex knowledge?
If matter is just illusion


I don't think that is Buddhist doctrine. I think that Buddhist doctrine is that we tend to view matter inappropriately or with ignorance.


  what is the origin of it


I'm not sure it has an origin. That might be considered an unanswered question. Several suttas (e.g. this one) mention "inconstruable beginning", saying "A beginning point is not evident".


  how is the matter being created by the conciousness


I'm not sure that matter is created by consciousness.

But "perception" (of matter) is created when consciousness, matter, and sense-organ come into contact (see e.g. here).