Figure 1: The basic Mind Works Model
The six senses in the form generate consciousness dependent on the sense base (eye, ear...) and give rise to contact (Figure 1). The sequence of events that happen from here on are discussed in detail in the mind works model. This will give rise to perceptions, feelings and thoughts (mental formations) in our present life as shown above. These perceptions, feelings and thoughts are influenced by our memories.
These thoughts (intentions) become our kamma for birth. The last thought will determine the rebirth-consciousness that will link with the next name-and-form and this is explained in the post, rebirth: how does it work?
When the present body dies, the six senses cease to exist. However the last contact from the senses (eye in this example) will keep generating throghts as shown in the video below. This suggests the mind can still be active when the body is clinically dead. Activity of the mind after clinical death is shown in scientific research published on Near Death experience (NDE). It is possible that one of these thoughts become the last thought. This thought will determine the last mind consciousness and that will become the rebirth-consciousness. The rebirth-consciousness will link with a new Name-and-Form and produce a rebirth or a new form (body). This body will hvae six senses and this process will go on (See Figure 2, Video).
Figure 2, Video