Apple appears to be developing a new version of its Apple Pencil and this version could allow users to doodle something without even touching the screen of another device.
According to Patently Apple, the U.S. Patent and Trademark Office approved an Apple patent, earlier this week, for a stylus that can write or draw on any surface or no surface at all. This device could not only allow content generation on a non-touch-sensitive surface like a table or wall, but it could also potentially work mid-air, without needing to touch a screen at all.

The patent describes a tip with a trackball-like component that would make the Apple Pencil easier to glide across any surface. This tip will be transparent in nature, since it'll house optical sensors to detect motion and activity. Apple plans to use advanced optical sensors, including optical flow sensors or laser-speckle flow sensors or a combination of both.
Optical flow sensors show work similar to the sensors inside a mouse. By detecting variations in the brightness patterns of light reflected from a surface, the styles will be able to analyse the direction and speed of movement. Laser-speckle flow sensors, on the other hand, will use consistent light to detect random patterns or "speckles" based on the light reflections from a rough surface.

The stylus could also incorporate the use of both these sensors to precisely measure how far it has moved and its angle relative to the surface. The data collected by these sensors will then be combined with other sensors on the Apple Pencil would make it easier to track its position, orientation and motion in 3D space. This would allow the use of the stylus on any surface, making it easy for users to create drawings or text without touching a screen.
The ability to track movement in 3D without needing traditional touchscreens opens up a world of possibility for the Apple Pencil. It could create new workflows and applications where users could be able to interact with digital elements overlaid on physical spaces, something similar to what one could do with the Apple Vision Pro.